| From: | Josh Berkus <josh(at)agliodbs(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Richard Huxton <dev(at)archonet(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>, Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Stats for multi-column indexes |
| Date: | 2007-03-20 17:12:14 |
| Message-ID: | 460015EE.90900@agliodbs.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom,
> Actually, I think you don't particularly need stats for that in most
> cases --- if the planner simply took note that the FK relationship
> exists, it would know that each row of the FK side joins to exactly
> one row of the PK side, which in typical cases is sufficient.
Is it? What about the other direction? Currently, doesn't the planner
assume that the rowcount relationship is 1 to ( child total rows /
parent total rows) ? That's ok for tables with relatively even
distribution, but not for skewed ones.
--Josh Berkus
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeff Davis | 2007-03-20 17:18:54 | Re: Stats for multi-column indexes |
| Previous Message | Tom Lane | 2007-03-20 17:11:13 | Effects of GUC settings on automatic replans |