Suggestion to reduce COPY command output to csv file - Mailing list pgsql-admin

From postggen2020 s
Subject Suggestion to reduce COPY command output to csv file
Date
Msg-id CAJ=omAhsJ89HqBtLBhE33RjvQ6ykbZjtM18igf=T-42m-nveBQ@mail.gmail.com
Whole thread Raw
Responses Re: Suggestion to reduce COPY command output to csv file  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Suggestion to reduce COPY command output to csv file  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Suggestion to reduce COPY command output to csv file  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Suggestion to reduce COPY command output to csv file  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Suggestion to reduce COPY command output to csv file  (Bo Victor Thomsen <bo.victor.thomsen@gmail.com>)
List pgsql-admin
Hi Team,
Thanks a lot all of you, for providing support peoples like me.
Could you please provide a suggestion on COPY command.

Environment:
DB Version:9.5.15
postgis:
Table contain GIS data.
 
I have a table with GIS data, its around 300MB and 2Lacks+ records. I want to export all the records to the CSV file. I can able to export the table data into a CSV file, but the exported CSV file size around 162MB.
While I am trying to opening the excel it is taking a long time and also while applying vlookup excel is getting hang.
 
I am using below command :
\copy cities TO '/var/lib/pgsql/cities.csv' (DELIMITER ',', FORMAT 'csv', HEADER)
 
I am trying to achieve the following :
1. The exported CSV file should have within 10MB.
2. The excel file should open quickly and able to perform vlookups without any problems(like hang).
 
Could you please provide suggestions on below queries:
1. what I am trying to achieve, is the right assumption?.
2. Can we use this command to use for the above use case?.
3. Is there any tool/extension available for the above use case.?
 
Your inputs are highly appreciated.
 
Regards,
Postgadm.

pgsql-admin by date:

Previous
From: Ishan Joshi
Date:
Subject: RE: Postgres server crash and not starting
Next
From: Adrian Klaver
Date:
Subject: Re: Suggestion to reduce COPY command output to csv file