From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Estimation issue with partitioned tables |
Date: | 2010-02-28 20:19:51 |
Message-ID: | 4B8ACFE7.6040207@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
All,
I'm seeing in a production database two problems with query rowcount
estimation:
(1) Estimates for the number of rows in an outer join do not take into
account any constraint exclusion (CE) in operation.
(2) Row estimates do not take into account if the unique indexes on the
child partitions are different from the master partition (the append
node). This is often true, because the key to the master is ( key, ce
column) and for the children is just ( key ).
The result is that if you do a series of outer joins using the CE
criterion against partitioned tables, the row estimates you get will be
several orders of magnitude too high ... and the subsequent query plan
far too pessimistic.
Anyone else seeing this? Do any of the 9.0 patches address the above
issues?
--Josh Berkus
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2010-02-28 20:29:14 | Re: partitioned tables query not using indexes |
Previous Message | Tom Lane | 2010-02-28 16:42:39 | Re: How to troubleshoot high mem usage by postgres? |