From: | Jim Finnerty <jfinnert(at)amazon(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: SELECT performance drop |
Date: | 2019-01-23 13:50:52 |
Message-ID: | 1548251452315-0.post@n3.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
One thing that isn't helping is that you have a redundant predicate. The
selectivity of this predicate is also estimated too low, so removing the
redundant predicate might improve the estimate and change the plan:
( "
+ " o.consumer IS NULL "
+ " ) OR ( "
+ " o.consumer IS NOT NULL "
+ " AND o.consumer > 0
remove "o.consumer IS NOT NULL AND", which is implied by o.consumer > 0.
This predicate should have been automatically removed, but the filter shown
in depesz shows that it was not.
If you can find out what the faster plan was, that would be helpful to know.
-----
Jim Finnerty, AWS, Amazon Aurora PostgreSQL
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-performance-f2050081.html
From | Date | Subject | |
---|---|---|---|
Next Message | Mariel Cherkassky | 2019-01-23 15:25:33 | ERROR: found xmin from before relfrozenxid |
Previous Message | Jan Nielsen | 2019-01-22 22:28:31 | Re: SELECT performance drop |