Re: 7.4 - FK constraint performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rod Taylor <rbt(at)rbt(dot)ca>
Cc: ow <oneway_111(at)yahoo(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: 7.4 - FK constraint performance
Date: 2004-02-13 04:25:36
Message-ID: 27443.1076646336@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

Rod Taylor <rbt(at)rbt(dot)ca> writes:
> Statistics say there are 10 values. Statistics list the 10 most common
> values (all of them). Given this, would it not be reasonable to assume
> that 239 is a recent addition (if there at all) to the table and not
> very common?

We don't know that it's 239 when we make the plan. In order to know
that, we'd have to abandon caching of RI check query plans and re-plan
for each row. That strikes me as inevitably a losing proposition.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-02-13 04:35:03 Re: [HACKERS] PITR Dead horse?
Previous Message Christopher Browne 2004-02-13 04:20:53 Re: Vacuum Delay feature

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2004-02-13 04:49:56 Re: 7.4 - FK constraint performance
Previous Message Rod Taylor 2004-02-13 02:53:45 Re: 7.4 - FK constraint performance