From: Jim C. Nasby <jim@nasby.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: josh@agliodbs.com, pgsql-performance <pgsql-performance@postgresql.org>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Hypothetical suggestions for planner, indexing improvement
Date: Tue, 6 May 2003 08:10:35 -0500
Message-ID: <20030506081035.D66185@flake.decibel.org> (raw)
In-Reply-To: <22292.1052195133@sss.pgh.pa.us>
References: <200305051219.58955.josh@agliodbs.com>
<22292.1052195133@sss.pgh.pa.us>
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?"
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: jim@nasby.net, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Hypothetical suggestions for planner, indexing improvement
In-Reply-To: <20030506081035.D66185@flake.decibel.org>
References: <200305051219.58955.josh@agliodbs.com> <22292.1052195133@sss.pgh.pa.us> <20030506081035.D66185@flake.decibel.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox