pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thorsten Glaser <tg@evolvis.org>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Lian Jiang <jiangok2006@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: speed up full table scan using psql
Date: Thu, 1 Jun 2023 00:01:07 +0200 (CEST)
Message-ID: <4299d8b-f374-c0cc-b9ad-66bdc0554a67@evolvis.org> (raw)
In-Reply-To: <d6b0d93a-e0fe-c92a-bec1-1f4de5627952@aklaver.com>
References: <CA+aY8X6E6qq-i_10G_wTjkorEtm3XYW+Ag+83xk7gmJUoAoing@mail.gmail.com>
	<c4bfbccc-b004-5830-ade9-c1a12db91e8a@aklaver.com>
	<CA+aY8X4Wn2KBDYsqspPOoWUybsB1Jh6yfBVChMSHxVkuRVm3VQ@mail.gmail.com>
	<d6b0d93a-e0fe-c92a-bec1-1f4de5627952@aklaver.com>

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!
                        ****************************************************





view thread (12+ messages)  latest in thread

Message-ID: <4299d8b-f374-c0cc-b9ad-66bdc0554a67@evolvis.org>
Permalink:  ../4299d8b-f374-c0cc-b9ad-66bdc0554a67@evolvis.org/
Also on:    postgresql.org/message-id/4299d8b-f374-c0cc-b9ad-66bdc0554a67@evolvis.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tg@evolvis.org, adrian.klaver@aklaver.com, jiangok2006@gmail.com
  Subject: Re: speed up full table scan using psql
  In-Reply-To: <4299d8b-f374-c0cc-b9ad-66bdc0554a67@evolvis.org>
  References: <CA+aY8X6E6qq-i_10G_wTjkorEtm3XYW+Ag+83xk7gmJUoAoing@mail.gmail.com> <c4bfbccc-b004-5830-ade9-c1a12db91e8a@aklaver.com> <CA+aY8X4Wn2KBDYsqspPOoWUybsB1Jh6yfBVChMSHxVkuRVm3VQ@mail.gmail.com> <d6b0d93a-e0fe-c92a-bec1-1f4de5627952@aklaver.com> <4299d8b-f374-c0cc-b9ad-66bdc0554a67@evolvis.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox