Tiago Antão <tra@fct.unl.pt> writes:
> One other idea would be to only have better statistics for special
> attributes requested by the user... something like "analyze special
> table(column)".
This might actually fall out "for free" from the cheapest way of
implementing the stats. We've talked before about scanning btree
indexes directly to obtain data values in sorted order, which makes
it very easy to find the most common values. If you do that, you
get good stats for exactly those columns that the user has created
indexes on. A tad indirect but I bet it'd be effective...
regards, tom lane