agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: aditya desai <admad123@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Fwd: Query out of memory
Date: Tue, 19 Oct 2021 05:26:13 -0500
Message-ID: <20211019102613.GJ4679@telsasoft.com> (raw)
In-Reply-To: <CAN0SRDFqJRjuSxNUrTvCQwKuhGv8r5rUn9WnX65kGSsTSxhoCw@mail.gmail.com>
References: <CAN0SRDHDte88-v4=uhxH1FWU0nt3xBJGTe5hTGj4KvKTtVRDtA@mail.gmail.com>
	<CAN0SRDFqJRjuSxNUrTvCQwKuhGv8r5rUn9WnX65kGSsTSxhoCw@mail.gmail.com>

On Tue, Oct 19, 2021 at 11:28:46AM +0530, aditya desai wrote:
> I am running the below query. Table has 21 million records. I get an Out Of
> Memory error after a while.(from both pgadmin and psql). Can someone review

Is the out of memory error on the client side ?
Then you've simply returned more rows than the client can support.

In that case, you can run it with "explain analyze" to prove that the server
side can run the query.  That returns no data rows to the client, but shows the
number of rows which would normally be returned.

-- 
Justin





view thread (14+ messages)  latest in thread

Message-ID: <20211019102613.GJ4679@telsasoft.com>
Permalink:  ../20211019102613.GJ4679@telsasoft.com/
Also on:    postgresql.org/message-id/20211019102613.GJ4679@telsasoft.com

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pryzby@telsasoft.com, admad123@gmail.com, pgsql-performance@lists.postgresql.org
  Subject: Re: Fwd: Query out of memory
  In-Reply-To: <20211019102613.GJ4679@telsasoft.com>

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

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