Re: [HACKERS] Hypothetical suggestions for planner, indexing improvement - Mailing list pgsql-performance

From Jim C. Nasby
Subject Re: [HACKERS] Hypothetical suggestions for planner, indexing improvement
Date
Msg-id 20030506081035.D66185@flake.decibel.org
Whole thread Raw
In response to Re: [HACKERS] Hypothetical suggestions for planner, indexing improvement  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
On Tue, May 06, 2003 at 12:25:33AM -0400, Tom Lane wrote:
> Josh Berkus <josh@agliodbs.com> writes:
> > THE IDEA:  The planner should keep statistics on the correlation of foreign
> > keys and apply them to the expected row counts for EXISTS clause limitations,
> > and possibly for other query types as well.
>
> It's a thought.  Keeping complete cross-column correlation stats (for
> every combination of columns in the DB) is obviously out of the
> question.  If you're gonna do it you need a heuristic to tell you which
> combinations of columns are worth keeping track of --- and foreign-key
> relationships seem like a reasonable guide to the interesting
> combinations.

What if the optimizer kept on-going statistics on what columns were used
in joins to what other columns? Over time this would allow analyze to
determine on it's own what cross-column correlation stats should be
kept.
--
Jim C. Nasby (aka Decibel!)                    jim@nasby.net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"


pgsql-performance by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: [HACKERS] Hypothetical suggestions for planner, indexing improvement
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Hypothetical suggestions for planner, indexing improvement