Re: Query out of memory
От
aditya desai
Тема
Re: Query out of memory
Дата
Msg-id
CAN0SRDEV9+6Pee-ZqjkSFPU9NsHDSwVRCoQW+=XiCpXtLCKLqw@mail.gmail.com
Список
Дерево обсуждения
Query out of memory aditya desai <admad123@gmail.com>
Re: Query out of memory Vijaykumar Jain <vijaykumarjain.github@gmail.com>
Re: Query out of memory aditya desai <admad123@gmail.com>
Re: Query out of memory Guillaume Lelarge <guillaume@lelarge.info>
Re: Query out of memory aditya desai <admad123@gmail.com>
This is how I received a query from the App Team. They have migrated from Oracle to Postgres. I see in Oracle where it is working fine and also has the same joins. Some of the developers increased the work_mem. I will try and tone it down. Will get back to you. Thanks.
On Tue, Oct 19, 2021 at 1:28 AM Geri Wright <geri.w123@gmail.com> wrote:
Hi,It looks like you have Cartesian joins in the query. Try updating your where clause to includeAnd g.columnname = t.columnnameAnd t.columnname2 = a.columnname2On Mon, Oct 18, 2021, 12:43 PM aditya desai <admad123@gmail.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 fromgk_staging g, transaction t,account awhereg.accountcodeis not null ANDg.accountcode::text <> '' ANDlength(g.accountcode)=13 ANDg.closeid::text=t.transactionid::text ANDsubsrting(g.accountcode::text,8)=a.mask_code::textBelow are system parameters.shared_buffers=3GBwork_mem=2GBeffective_cache_size=10GBmaintenance_work_mem=1GBmax_connections=250I am unable to paste explain plan here due to security concerns.Regards,Aditya.
В списке pgsql-sql по дате отправления