RE: Performance of a Query - Mailing list pgsql-performance

From Danylo Hlynskyi
Subject RE: Performance of a Query
Date
Msg-id CANZg+yej6hAotAq6QL8i0Bw6AMfaBO6tjWOW1kiLiNSvQPxfeg@mail.gmail.com
Whole thread Raw
In response to Performance of a Query  ("Kumar, Virendra" <Virendra.Kumar@guycarp.com>)
List pgsql-performance
Can you try to extract filter part as CTE? Like

with filtered as (select ... where policyid = 123456)
select ... (here comes original query but uses filtered table instead)

10 янв. 2018 г. 1:10 пользователь "Kumar, Virendra" <Virendra.Kumar@guycarp.com> написал:
It did not seem to help.
See attachment.


Regards,
Virendra
-----Original Message-----
From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
Sent: Tuesday, January 09, 2018 6:00 PM
To: Kumar, Virendra
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance of a Query

On Tue, Jan 9, 2018 at 3:25 PM, Kumar, Virendra <Virendra.Kumar@guycarp.com> wrote:
> Thank you Scott!
> I have current work_mem set as 4MB, shared_buffers to 8GB, hugepages on.
> I gradually increased the work_mem to 1GB but it did not help a bit. Am I missing something obvious.
> From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
> Sent: Tuesday, January 09, 2018 5:08 PM
> To: Kumar, Virendra
> Cc: pgsql-performance@postgresql.org
> Subject: Re: Performance of a Query

Try it with something reasonable like 64MB and then post your query plans to explain.depesz and then here and let's compare. Note that some queries are just slow, and this one is handling a lot of data, so there's only so much to do if an index won't fix it.


________________________________

This message is intended only for the use of the addressee and may contain
information that is PRIVILEGED AND CONFIDENTIAL.

If you are not the intended recipient, you are hereby notified that any
dissemination of this communication is strictly prohibited. If you have
received this communication in error, please erase all copies of the message
and its attachments and notify the sender immediately. Thank you.

pgsql-performance by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Need Help on wal_compression
Next
From: Laurenz Albe
Date:
Subject: Re: Performance of a Query