"Tom Lane" <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >> It's possible that the second option I described -- teaching Append when to >> use something other than sum() -- would only work in the cases where >> constraint exclusion could be fixed though. In which case having fractional >> row counts might actually be necessary. > > The above is just armwaving. IMHO, if you don't understand the > structure of the table set then you're not going to be able to get the > desired behavior via fractional rowcounts either.
That's only a specific subset of cases. You could just as easily have quals which are only coincidentally related to the partition key or even not related at all, just very selective and produce no records from some partitions. The bottom line is that if you have a large table our statistics do a good job estimating the selectivity of a where clause with the minimum clamped to 1. If you partition it into 100 partitions then the minimum is clamped to 100. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers