Re: Scrub one large table against another - Mailing list pgsql-performance

From Tom Lane
Subject Re: Scrub one large table against another
Date
Msg-id 14924.1160677509@sss.pgh.pa.us
Whole thread Raw
In response to Re: Scrub one large table against another  (Brendan Curran <brendan.curran@gmail.com>)
List pgsql-performance
Brendan Curran <brendan.curran@gmail.com> writes:
> I'll tack up a note to the online documentation letting people know so
> that it's a little more explicitly clear that when you choose IN on
> data that isn't explicitly unique (to the planner i.e.  post-analyze)
> you get the baggage of a forced unique whether you need it or not. Or
> perhaps someone that knows the internals of the planner a little
> better than me should put some info up regarding that?

You get a forced unique step, period --- the planner doesn't try to
shortcut on the basis of noticing a relevant unique constraint.
We have some plan techniques that might look like they are not checking
uniqueness (eg, an "IN Join") but they really are.

This is an example of what I was talking about just a minute ago, about
not wanting to rely on constraints that could go away while the plan is
still potentially usable.  It's certainly something that we should look
at adding as soon as the plan-invalidation infrastructure is there to
make it safe to do.

            regards, tom lane

pgsql-performance by date:

Previous
From: Brendan Curran
Date:
Subject: Re: Scrub one large table against another
Next
From: Andrew Sullivan
Date:
Subject: Re: [HACKERS] Hints proposal