Re: SELECT performance drop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux