Re: [HACKERS] Cross-table statistics idea

2006-09-27 Thread Jim C. Nasby
On Wed, Sep 27, 2006 at 12:30:43PM +0100, Simon Riggs wrote: > On Tue, 2006-09-26 at 21:27 -0500, Jim C. Nasby wrote: > > Since I don't recall any ideas ever having been thrown out on how to do > > this... > > > > ISTM that we could gain additional insight on how many rows would likely > > result

Re: [HACKERS] Cross-table statistics idea

2006-09-27 Thread Simon Riggs
On Tue, 2006-09-26 at 21:27 -0500, Jim C. Nasby wrote: > Since I don't recall any ideas ever having been thrown out on how to do > this... > > ISTM that we could gain additional insight on how many rows would likely > result from a join One thing we can do is to use cross-column relationships to

Re: [HACKERS] Cross-table statistics idea

2006-09-26 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > ISTM that we could gain additional insight on how many rows would likely > result from a join be comparing the "shape" of the histogram for the > joining columns. eqjoinsel already does this for the case of comparing the MCV lists. If you're serious abo

[HACKERS] Cross-table statistics idea

2006-09-26 Thread Jim C. Nasby
Since I don't recall any ideas ever having been thrown out on how to do this... ISTM that we could gain additional insight on how many rows would likely result from a join be comparing the "shape" of the histogram for the joining columns. For example, if the histogram arrays were exactly identical