Re: [GENERAL] BUMP: Using foreign key constraint to eliminate unnecessary joins in view

2009-04-13 Thread Tom Lane
Paul Wehr writes: > A last try on this question. In the absence of any response, I'll assume > the postgresql query optimizer simply doesn't take foreign keys into > account in this way. It does not, and never has, and yes there's a TODO item about that. regards, tom lan

Re: [GENERAL] BUMP: Using foreign key constraint to eliminate unnecessary joins in view

2009-04-13 Thread Jaime Casanova
On Mon, Apr 13, 2009 at 2:36 PM, Paul Wehr wrote: > > I am looking for a way to get the plan to show only a seq scan of test2, > since test1 does not contribute any columns, and we know from the > not-deferrable-not-null-primary-key that there will always be exactly one > match. > > Am I just miss

Re: [GENERAL] BUMP: Using foreign key constraint to eliminate unnecessary joins in view

2009-04-13 Thread Scott Marlowe
On Mon, Apr 13, 2009 at 1:36 PM, Paul Wehr wrote: > > A last try on this question.  In the absence of any response, I'll assume > the postgresql query optimizer simply doesn't take foreign keys into > account in this way. > > Original Message > Subject: Using foreign key constrai

[GENERAL] BUMP: Using foreign key constraint to eliminate unnecessary joins in view

2009-04-13 Thread Paul Wehr
A last try on this question. In the absence of any response, I'll assume the postgresql query optimizer simply doesn't take foreign keys into account in this way. Original Message Subject: Using foreign key constraint to eliminate unnecessary joins in view Date: Sun, 29 Mar 200