You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I read in the documentation of cstore_fdw that while loading data into cstore foreign table after sorting it on a column that is commonly used in the WHERE clause.
I am using a COPY from CSV to load the data in cstore foreign table like below
\COPY (SELECT * FROM tbl_metrics_partition_2020_q3 WHERE report_date >= '2020-09-01' AND report_date <= '2020-09-30') TO 'tbl_metrics_partition_fdw_2020_m9.csv' CSV DELIMITER ',' HEADER
\COPY tbl_metrics_partition_fdw_2020_m9 FROM 'tbl_metrics_partition_fdw_2020_m9.csv' CSV DELIMITER ',' HEADER
If I add a order by in the select statement when creating the CSV file, will the copy command to the cstore table insert into order?
The text was updated successfully, but these errors were encountered:
-- Create a CSV file with data sorted by a column commonly used in the WHERE clause
\COPY (
SELECT * FROM tbl_metrics_partition_2020_q3
WHERE report_date >= '2020-09-01' AND report_date <= '2020-09-30'
ORDER BY report_date -- Add ORDER BY clause here
) TO 'tbl_metrics_partition_fdw_2020_m9.csv' CSV DELIMITER ',' HEADER;
-- Copy the data from the CSV file into the cstore foreign table
\COPY tbl_metrics_partition_fdw_2020_m9 FROM 'tbl_metrics_partition_fdw_2020_m9.csv' CSV DELIMITER ',' HEADER;
Hey team,
I read in the documentation of cstore_fdw that while loading data into cstore foreign table after sorting it on a column that is commonly used in the WHERE clause.
I am using a COPY from CSV to load the data in cstore foreign table like below
The text was updated successfully, but these errors were encountered: