Re: [HACKERS] Hypothetical suggestions for planner, indexing improvement

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: josh(at)agliodbs(dot)com, pgsql-performance <pgsql-performance(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Hypothetical suggestions for planner, indexing improvement
Date: 2003-05-06 13:10:35
Message-ID: 20030506081035.D66185@flake.decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On Tue, May 06, 2003 at 12:25:33AM -0400, Tom Lane wrote:
> Josh Berkus <josh(at)agliodbs(dot)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(at)nasby(dot)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?"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-05-06 13:45:07 Re: [PERFORM] Hypothetical suggestions for planner, indexing improvement
Previous Message Jim C. Nasby 2003-05-06 13:07:47 Re: [HACKERS] Hypothetical suggestions for planner, indexing improvement

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2003-05-06 13:45:07 Re: [PERFORM] Hypothetical suggestions for planner, indexing improvement
Previous Message Jim C. Nasby 2003-05-06 13:07:47 Re: [HACKERS] Hypothetical suggestions for planner, indexing improvement