Re: Query out of memory

From: Ninad Shah <nshah(dot)postgres(at)gmail(dot)com>
To: aditya desai <admad123(at)gmail(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: Query out of memory
Date: 2021-10-22 14:41:17
Message-ID: CAOFEiBfPJkozDiszgquAgRNoAEatVOehh-OxpsgGOMzKWb2-HQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance pgsql-sql

Do you see any issue in PostgreSQL log files?

Regards,
Ninad Shah

On Tue, 19 Oct 2021 at 16:17, aditya desai <admad123(at)gmail(dot)com> wrote:

> Hi Justin,
> Out of memory on pgadmin and psql. I executed it with explain analyze.
> Still going out of memory.
>
> Also currently 250 user connections are not being made. There are hardly
> 10 connections to database. When I run thi query it is going out of memory.
>
> Also this query is part of a view that gets referred in a
> procedure.Transaction table is partitioned table but due to business
> requirements partition key is not part of where clause.
>
> Regards,
> Aditya.
>
> On Tuesday, October 19, 2021, Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
>
>> 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
>>
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Andres Freund 2021-10-25 23:35:46 Re: Lock contention high
Previous Message David G. Johnston 2021-10-20 14:29:51 Re: Postgres views cannot use both union and join/where

Browse pgsql-sql by date

  From Date Subject
Next Message aditya desai 2021-10-23 09:40:28 Convert text to user defined datatype
Previous Message David G. Johnston 2021-10-19 14:37:20 Re: create a procedure based on column data change in postgrersql