Re: Hints (Was: [HACKERS] Index Tuning Features)

2006-10-13 Thread Josh Berkus
Tom, 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

Hints (was: [HACKERS] Index Tuning Features)

2006-10-12 Thread Andrew Sullivan
On Wed, Oct 11, 2006 at 03:08:42PM -0700, Ron Mayer wrote: Is one example is the table of addresses clustered by zip-code and indexes on State, City, County, etc? No. Now I'm not saying that a more advanced statistics system couldn't one-day be written that sees these patterns in the data

Hints (Was: [HACKERS] Index Tuning Features)

2006-10-12 Thread Andrew Sullivan
On Thu, Oct 12, 2006 at 08:34:45AM +0200, Florian Weimer wrote: Some statistics are very hard to gather from a sample, e.g. the number of distinct values in a column. Then how can the DBA know it, either? The problem with this sort of argument is always that people are claiming some special

Re: Hints (Was: [HACKERS] Index Tuning Features)

2006-10-12 Thread Casey Duncan
On Oct 12, 2006, at 4:26 AM, Andrew Sullivan wrote: On Thu, Oct 12, 2006 at 08:34:45AM +0200, Florian Weimer wrote: Some statistics are very hard to gather from a sample, e.g. the number of distinct values in a column. Then how can the DBA know it, either? The problem with this sort of

Re: Hints (Was: [HACKERS] Index Tuning Features)

2006-10-12 Thread Tom Lane
Casey Duncan [EMAIL PROTECTED] 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

Re: Hints (Was: [HACKERS] Index Tuning Features)

2006-10-12 Thread Andrew Dunstan
Tom Lane wrote: 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