Chapters
Intro
Intro
0:00
Intro
0:00
Key Scenarios
Key Scenarios
2:02
Key Scenarios
2:02
Creating unclogged tables
Creating unclogged tables
2:28
Using COPY command
Using COPY command
5:15
Using COPY command
5:15
Batch inserts vs Single commits
Batch inserts vs Single commits
6:48
Removing/Disabling contraints, triggers, & indexes
Removing/Disabling contraints, triggers, & indexes
8:27
Partitioning the table
Partitioning the table
10:26
Partitioning the table
10:26
HA & Read Replica
HA & Read Replica
11:42
HA & Read Replica
11:42
Tuning server parameters
Tuning server parameters
13:08
Tuning server parameters
13:08
Sync to video time
Description
21Likes
432Views
Jun 132024
- Creation of unlogged tables (which does not create WAL files and inserts could be fast, however if any crashes we might lose data.)
- Use a copy command for huge inserts.
- Make your inserts in batches instead of single insert commits.
- Tuning server parameters (like autovacuum, wal_buffers, max_wal_size, shared_buffers, Checkpoint_timeout).
- Do we have any constraints on the tables? If so, we need to disable them during the inserts and enable them after.
- Disable triggers if they exist before inserts if that is possible.
- Remove unused indexes from the table.
- One can also consider partitioning of tables if the table that is being inserted in is exceptionally large.
- If the activity is one time you may consider disabling HA (high availability) drop read replica and create it back after inserts.
Transcript
Follow along using the transcript.
Show transcript
Microsoft Developer
588K subscribers
Transcript
NaN / NaN
Show more