timescaledb-parallel-copy import times
Test Setup:
- Target Table:
test3.converted_3m_timescale (Pre-created with all TEXT columns)
Results Summary Table:
workers Flag |
batch-size Flag |
Time Taken (seconds) |
| Default (1) |
Default(5k) |
45.51s |
| 8 |
Default |
41.39s |
| 5 |
Default |
45.22s |
| 5 |
10000 |
42.07s |
Raw Command Outputs:
# Default Workers=1
❯ go run main.go --connection="host=localhost port=5432 user=postgres sslmode=disable" --table converted_3m_timescale --schema test3 --file "/Users/agali/Downloads/temp/my_data/converted_3m.csv" "billing_account_id, service, sku, usage_start_time, usage_end_time, project, labels, system_labels, location, resource, tags, price, subscription, transaction_type, export_time, cost, currency, currency_conversion_rate, usage, credits, invoice, cost_type, adjustment_info, cost_at_list" --skip-header true
2025/04/10 00:08:14 Copy command: COPY "test3"."converted_3m_timescale" FROM STDIN WITH DELIMITER ',' CSV
2025/04/10 00:08:59 total rows 3300001
COPY 3300001 took 45.508942916s
# Workers = 8
❯ go run main.go --connection="host=localhost port=5432 user=postgres sslmode=disable" --table converted_3m_timescale --schema test3 --file "/Users/agali/Downloads/temp/my_data/converted_3m.csv" "billing_account_id, service, sku, usage_start_time, usage_end_time, project, labels, system_labels, location, resource, tags, price, subscription, transaction_type, export_time, cost, currency, currency_conversion_rate, usage, credits, invoice, cost_type, adjustment_info, cost_at_list" --skip-header true --workers 8
2025/04/10 00:02:45 Copy command: COPY "test3"."converted_3m_timescale" FROM STDIN WITH DELIMITER ',' CSV
2025/04/10 00:03:26 total rows 3300001
COPY 3300001 took 41.389381459s
# Workers = 5
❯ go run main.go --connection="host=localhost port=5432 user=postgres sslmode=disable" --table converted_3m_timescale --schema test3 --file "/Users/agali/Downloads/temp/my_data/converted_3m.csv" "billing_account_id, service, sku, usage_start_time, usage_end_time, project, labels, system_labels, location, resource, tags, price, subscription, transaction_type, export_time, cost, currency, currency_conversion_rate, usage, credits, invoice, cost_type, adjustment_info, cost_at_list" --skip-header true --workers 5
2025/04/10 00:04:04 Copy command: COPY "test3"."converted_3m_timescale" FROM STDIN WITH DELIMITER ',' CSV
2025/04/10 00:04:49 total rows 3300001
COPY 3300001 took 45.222426583s
# Workers = 5, Batch Size = 10000
❯ go run main.go --connection="host=localhost port=5432 user=postgres sslmode=disable" --table converted_3m_timescale --schema test3 --file "/Users/agali/Downloads/temp/my_data/converted_3m.csv" "billing_account_id, service, sku, usage_start_time, usage_end_time, project, labels, system_labels, location, resource, tags, price, subscription, transaction_type, export_time, cost, currency, currency_conversion_rate, usage, credits, invoice, cost_type, adjustment_info, cost_at_list" --skip-header true --workers 5 --batch-size 10000
2025/04/10 00:06:01 Copy command: COPY "test3"."converted_3m_timescale" FROM STDIN WITH DELIMITER ',' CSV
2025/04/10 00:06:42 total rows 3300001
COPY 3300001 took 42.070157s