34.4. Using Multi-Segment Insertion with Append-Optimized Tables #

For data migration, you can use multi-segment insertion with append-optimized tables to improve performance. However, combining bulk insertion features provides better results only if wal_compression is enabled.

  1. Enable append_optimized for the target table.

  2. Add the target table name to the multi_segment_relname parameter.

  3. Enable wal_compression.

  4. Set work_mem to 10 MB or higher.

After data migration is completed, disable multi-segment insertion. Optionally, disable wal_compression. You can leave the append_optimized parameter enabled if you expect many INSERT operations. However, this option will not speed up UPDATE operations.