Re: speed up full table scan using psql - Mailing list pgsql-general

From Thorsten Glaser
Subject Re: speed up full table scan using psql
Date
Msg-id 4299d8b-f374-c0cc-b9ad-66bdc0554a67@evolvis.org
Whole thread Raw
In response to Re: speed up full table scan using psql  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
On Wed, 31 May 2023, Adrian Klaver wrote:

> Given that I would just COPY the data out as CSV.

I recently did something similar. I found the JSON functions not quite
satisfying and the extra spaces redundant, but it turns out that, for
a numerical table, exporting as CSV, loading that via AJAX then (on
xhr.responseText) substituting newlines with '],[' and prepending '[['
and appending ']]' was enough to let JSON.parse eat it.

With strings this is more complex ofc (though partial use of JSON
functions, e.g. to convert strings to JSONString already, might help).

bye,
//mirabilos
--
Infrastrukturexperte • tarent solutions GmbH
Am Dickobskreuz 10, D-53121 Bonn • http://www.tarent.de/
Telephon +49 228 54881-393 • Fax: +49 228 54881-235
HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

                        ****************************************************
/⁀\ The UTF-8 Ribbon
╲ ╱ Campaign against      Mit dem tarent-Newsletter nichts mehr verpassen:
 ╳  HTML eMail! Also,     https://www.tarent.de/newsletter
╱ ╲ header encryption!
                        ****************************************************



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: speed up full table scan using psql
Next
From: Adrian Klaver
Date:
Subject: Re: speed up full table scan using psql