Re: Query out of memory

From: aditya desai <admad123(at)gmail(dot)com>
To: pgsql-sql <pgsql-sql(at)lists(dot)postgresql(dot)org>
Subject: Re: Query out of memory
Date: 2021-10-18 16:43:33
Message-ID: CAN0SRDG4zEx-Cd-WY7tbwhB=fTJtOOGG+LjW6+s+jdYNiF+=fA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance pgsql-sql

Database has 20GB RAM.

On Mon, Oct 18, 2021 at 10:12 PM aditya desai <admad123(at)gmail(dot)com> wrote:

> Hi,
> 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 DB parameters given below.
>
> select t.*,g.column,a.column from
> gk_staging g, transaction t,account a
> where
> g.accountcodeis not null AND
> g.accountcode::text <> '' AND
> length(g.accountcode)=13 AND
> g.closeid::text=t.transactionid::text AND
> subsrting(g.accountcode::text,8)=a.mask_code::text
>
> Below are system parameters.
> shared_buffers=3GB
> work_mem=2GB
> effective_cache_size=10GB
> maintenance_work_mem=1GB
> max_connections=250
>
> I am unable to paste explain plan here due to security concerns.
>
> Regards,
> Aditya.
>
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Vijaykumar Jain 2021-10-18 16:48:23 Re: Query out of memory
Previous Message aditya desai 2021-10-18 16:42:52 Query out of memory

Browse pgsql-sql by date

  From Date Subject
Next Message Vijaykumar Jain 2021-10-18 16:48:23 Re: Query out of memory
Previous Message aditya desai 2021-10-18 16:42:52 Query out of memory