Blame

b94393 German Gamboa 2026-03-18 03:23:32
1
# General Notes
2
3
## Offload as much work from the application layer to the database.
4
thoughs here is db is going to be faster than the app layer most of the time.
5
Also its easier to deal with the "distributedness" of a system by just doing it in a in a single spot.
6
7
8
## unnest is pretty cool for inserting multiple rows:
9
```sql
0d9f64 German Gamboa 2026-03-18 03:24:01
10
INSERT INTO table_name (col1, col2, col3)
11
SELECT * FROM UNNEST(
12
ARRAY['val1', 'val2', 'val3'],
13
ARRAY['val4', 'val5', 'val6'],
14
ARRAY[1, 2, 3]);
b94393 German Gamboa 2026-03-18 03:23:32
15
```