Re: [HACKERS] Cross-field statistics

2008-04-17 Thread Decibel!
On Apr 17, 2008, at 12:22 PM, Gregory Stark wrote: "Decibel!" <[EMAIL PROTECTED]> writes: For each field that isn't already in a set of field groupings * Sort sample rows on that field * Calculate correlation for all other fields * If there are other fields that have a correlation to this so

Re: [HACKERS] Cross-field statistics

2008-04-17 Thread Gregory Stark
"Decibel!" <[EMAIL PROTECTED]> writes: > For each field that isn't already in a set of field groupings > * Sort sample rows on that field > * Calculate correlation for all other fields > * If there are other fields that have a correlation to this sort order over > some threshold, save them alo

[HACKERS] Cross-field statistics

2008-04-17 Thread Decibel!
I just had an idea about how to create cross-field statistics, which could greatly improve the quality of estimates involving multiple conditions on one table. This is rather arm-wavy, but I wanted to at least get the idea out... If we built a table via CREATE TABLE moo AS SELECT i, i*2 AS