Casey Duncan <casey@pandora.com> writes:
> Yes, but it may be much more efficient for the human to tell the
> computer than for the computer to introspect things. Take, for
> example, ndisinct as data grows large.
Yeah, an override estimate for a column's ndistinct seems a perfect
example of the sort of statistical hint that I'd be in favor of having.
We have also talked about solving the multi-column statistics problem
(which, at its core, is "which combinations of columns are worth
accumulating stats for?" --- you can't possibly store stats for every
combination!) by having what would amount to hints from the DBA saying
"keep stats for these combinations".
regards, tom lane