Re: [PERFORM] not in(subselect) in 8.4

2009-02-22 Thread Grzegorz Jaśkiewicz
but then you have 10 questions a week from windows people about password, and yet you haven't remove that :P -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] not in(subselect) in 8.4

2009-02-21 Thread Robert Haas
On Sat, Feb 21, 2009 at 10:41 PM, Tom Lane wrote: > Scott Carey writes: >> Are there any optimizations planned for the case where columns are >> defined as NOT NULL? > > We might get around to recognizing that case as an antijoin sometime. > It's nontrivial though, because you have to check for a

Re: [PERFORM] not in(subselect) in 8.4

2009-02-21 Thread Tom Lane
Scott Carey writes: > Are there any optimizations planned for the case where columns are > defined as NOT NULL? We might get around to recognizing that case as an antijoin sometime. It's nontrivial though, because you have to check for an intermediate outer join causing the column to be possibly

Re: [PERFORM] not in(subselect) in 8.4

2009-02-21 Thread Scott Carey
formance-ow...@postgresql.org [pgsql-performance-ow...@postgresql.org] On Behalf Of Tom Lane [...@sss.pgh.pa.us] Sent: Friday, February 20, 2009 7:33 AM To: Grzegorz Jaśkiewicz Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] not in(subselect) in 8.4 =?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?=

Re: [PERFORM] not in(subselect) in 8.4

2009-02-21 Thread Tom Lane
=?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= writes: > the foo bar example above, with notion that all columns are NOT NULL > behaves much different now. AFAIK the treatment of NOT IN subselects hasn't changed a bit since 8.3. So I still find your complaint uninformative. regards

Re: [PERFORM] not in(subselect) in 8.4

2009-02-21 Thread Grzegorz Jaśkiewicz
the foo bar example above, with notion that all columns are NOT NULL behaves much different now. I noticed, that some of the 'anti join' stuff has changed in cvs recently, but I don't know if that's to blame. Basically, what I can see, is that the subselect case is no longer of lower cost, to the l

Re: [PERFORM] not in(subselect) in 8.4

2009-02-21 Thread Tom Lane
=?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= writes: > after your recent commit Tom, the cost is sky-high, and also it takes > ages again with subselect version. In case of two table join. I have > to try the three way one. Which commit, and what example are you talking about? re

Re: [PERFORM] not in(subselect) in 8.4

2009-02-21 Thread Grzegorz Jaśkiewicz
after your recent commit Tom, the cost is sky-high, and also it takes ages again with subselect version. In case of two table join. I have to try the three way one. -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postg

Re: [PERFORM] not in(subselect) in 8.4

2009-02-20 Thread Rodrigo E . De León Plicet
On Fri, Feb 20, 2009 at 6:14 AM, marcin mank wrote: > On Fri, Feb 20, 2009 at 4:56 AM, Grzegorz Jaśkiewicz > wrote: >> Just as a question to Tom and team, > > maybe it`s time for asktom.postgresql.org? Oracle has it :) +1 -- Sent via pgsql-performance mailing list (pgsql-performance@postgres

Re: [PERFORM] not in(subselect) in 8.4

2009-02-20 Thread Grzegorz Jaśkiewicz
On Fri, Feb 20, 2009 at 3:33 PM, Tom Lane wrote: > =?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= writes: >> I mean query like: >> select id from foo where id not in ( select id from bar); >> into: >> select f.id from foo f left join bar b on f.id=b.id where b.id is null; > > Postgres does not do that, bec

Re: [PERFORM] not in(subselect) in 8.4

2009-02-20 Thread Tom Lane
=?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= writes: > I mean query like: > select id from foo where id not in ( select id from bar); > into: > select f.id from foo f left join bar b on f.id=b.id where b.id is null; Postgres does not do that, because they don't mean the same thing --- the behavior for NU

Re: [PERFORM] not in(subselect) in 8.4

2009-02-20 Thread marcin mank
> Just as a question to Tom and team, maybe it`s time for asktom.postgresql.org? Oracle has it :) -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] not in(subselect) in 8.4

2009-02-20 Thread Grzegorz Jaśkiewicz
On Fri, Feb 20, 2009 at 11:14 AM, marcin mank wrote: >> Just as a question to Tom and team, > > maybe it`s time for asktom.postgresql.org? Oracle has it :) hehe, on the other hand - that would make my ppl here very skilfull, the only reason I started to praise them about joins, and stuff - is be