Skip to content
Snippets Groups Projects
  • Tom Lane's avatar
    a36088bc
    Skip text->binary conversion of unnecessary columns in contrib/file_fdw. · a36088bc
    Tom Lane authored
    When reading from a text- or CSV-format file in file_fdw, the datatype
    input routines can consume a significant fraction of the runtime.
    Often, the query does not need all the columns, so we can get a useful
    speed boost by skipping I/O conversion for unnecessary columns.
    
    To support this, add a "convert_selectively" option to the core COPY code.
    This is undocumented and not accessible from SQL (for now, anyway).
    
    Etsuro Fujita, reviewed by KaiGai Kohei
    a36088bc
    History
    Skip text->binary conversion of unnecessary columns in contrib/file_fdw.
    Tom Lane authored
    When reading from a text- or CSV-format file in file_fdw, the datatype
    input routines can consume a significant fraction of the runtime.
    Often, the query does not need all the columns, so we can get a useful
    speed boost by skipping I/O conversion for unnecessary columns.
    
    To support this, add a "convert_selectively" option to the core COPY code.
    This is undocumented and not accessible from SQL (for now, anyway).
    
    Etsuro Fujita, reviewed by KaiGai Kohei
copy.c 112.26 KiB