From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-performance <pgsql-performance(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Hypothetical suggestions for planner, indexing improvement |
Date: | 2003-05-06 04:33:33 |
Message-ID: | 200305052133.33680.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
Tom,
> 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.
Yes. It would also make FKs something more than just an annoying (and slow)
constraint in PostgreSQL. And it would be a performance feature that most
other RDBMSs don't have ;-)
> I'm not sure about the long-term usefulness of optimizing EXISTS per se.
> Seems to me that a lot of the present uses of EXISTS are workarounds
> for Postgres' historic mistreatment of IN ... which we've attacked more
> directly for 7.4. But cross-column correlations are certainly useful
> for estimating join sizes in general.
EXISTS is more flexible than IN; how can you do a 3-column corellation on an
IN clause?
The reason that I mention EXISTS is because that's where the lack of
cross-column corellation is most dramatic; the planner seems to estimate a
flat 50% for EXISTS clauses regardless of the content.
--
Josh Berkus
Aglio Database Solutions
San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-05-06 04:45:30 | Re: Hypothetical suggestions for planner, indexing improvement |
Previous Message | Tom Lane | 2003-05-06 04:25:33 | Re: Hypothetical suggestions for planner, indexing improvement |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-05-06 04:45:30 | Re: Hypothetical suggestions for planner, indexing improvement |
Previous Message | Tom Lane | 2003-05-06 04:25:33 | Re: Hypothetical suggestions for planner, indexing improvement |