Skip to content

How to insert load / into cstore foreign tables in order #248

@rameshkaranth

Description

@rameshkaranth

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

\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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions