Re: 7.4 - FK constraint performance

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 13:57:50
Message-ID: 1076680669.10896.17.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

On Thu, 2004-02-12 at 23:25, Tom Lane wrote:
> 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.

Right, sorry, I forgot this was out of a fk trigger.

--
Rod Taylor <rbt [at] rbt [dot] ca>

Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
PGP Key: http://www.rbt.ca/rbtpub.asc

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-02-13 14:15:54 Re: [PATCHES] log session end - again
Previous Message Rod Taylor 2004-02-13 13:57:20 Re: 7.4 - FK constraint performance

Browse pgsql-sql by date

  From Date Subject
Next Message Rod Taylor 2004-02-13 14:09:05 Re: column alias and group by/having/order
Previous Message Rod Taylor 2004-02-13 13:57:20 Re: 7.4 - FK constraint performance