Re: Scrub one large table against another

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: brendan(dot)curran(at)gmail(dot)com
Cc: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>, g(at)nasby(dot)net, Pg Performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Scrub one large table against another
Date: 2006-10-12 18:25:09
Message-ID: 14924.1160677509@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Brendan Curran <brendan(dot)curran(at)gmail(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Andrew Sullivan 2006-10-12 19:03:47 Re: [HACKERS] Hints proposal
Previous Message Merlin Moncure 2006-10-12 18:21:55 Re: [PERFORM] Hints proposal