New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
Loading a million rows one INSERT at a time is going to take all night.
What you'll have at the end
The same file loaded with COPY instead of row-by-row INSERT, the before and after load times written down, and the loaded row count confirmed against the source file.
You need
A file of rows ready to load (a CSV export) and a target table that already exists with matching columns, loaded so far through a script that issues one INSERT per row.
Not covered
Whether this load should be a full reload or only pull what changed since last time, and making a rerun of it safe against duplicate rows.
Make a pipeline safe to rerun with an upsert
go there if this load might run more than once, since a plain COPY has no protection against loading the same file twice.
Choose full reload or incremental for a new source
go there first if you have not yet decided whether this file should be the whole source table or only what changed.
Reconcile every row between source and target after a load
go there for a full source-to-target reconciliation beyond the row-count check this recipe stops at.
Checked 25 Aug 2026
Part of the ETL (Extract, Transform, Load) cookbook