Re: [HACKERS] Hypothetical suggestions for planner, indexing improvement
От | Jim C. Nasby |
---|---|
Тема | Re: [HACKERS] Hypothetical suggestions for planner, indexing improvement |
Дата | |
Msg-id | 20030506081035.D66185@flake.decibel.org обсуждение исходный текст |
Ответ на | Re: [HACKERS] Hypothetical suggestions for planner, indexing improvement (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | 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 по дате отправления: