Re: Performance tunning - Mailing list pgsql-performance

From Jeff Janes
Subject Re: Performance tunning
Date
Msg-id CAMkU=1xJTxf6Mj9Gc04ceTCrG2rjf9iMbjB4NOUtqC9OzZnsVg@mail.gmail.com
Whole thread Raw
In response to Performance tunning  (sugnathi hai <suganhai@yahoo.com>)
List pgsql-performance
On Sat, May 30, 2020 at 3:37 AM sugnathi hai <suganhai@yahoo.com> wrote:
Hi ,

Can you help to tune the below plan


It looks like your query (which you should show us) has something like

  ORDER BY modifieddate LIMIT 100

It thinks it can walk the index in order, then stop once it collects 100 qualifying rows.  But since almost all rows are removed by the join conditions, it ends up walking a large chunk of the index before finding 100 of them which qualify.

You could try forcing it out of this plan by doing:

  ORDER BY modifieddate + interval '0 second' LIMIT 100

 Cheers,

Jeff

pgsql-performance by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Performance tunning
Next
From: sugnathi hai
Date:
Subject: Configuration