pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: l1t@tom.com
To: pgsql-bugs@postgresql.org
Subject: BUG #7556: "select not in sub query" plan very poor vs "not exists"
Date: Wed, 19 Sep 2012 05:48:08 +0000
Message-ID: <E1TED8q-00047D-Va@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      7556
Logged by:          lt
Email address:      l1t@tom.com
PostgreSQL version: 9.2.0
Operating system:   windows xp
Description:        

test=# create table sli_test (id int primary key,info varchar(20));
test=# insert into sli_test select
generate_series(1,1000000),'digoal'||generate_series(1,1000000);
test=# analyze verbose sli_test;
test=# create table sli_test2 (id int not null,info varchar(20));
test=#  insert into sli_test2 select
generate_series(1,1000000),'dbase'||generate_series(1,1000000);
test=# analyze verbose sli_test2;
test=# explain select max(a.info)from sli_test a where a.id not in(select
b.id from sli_test2 b where b.id<50000);
                                      QUERY PLAN
---------------------------------------------------------------------------------------
 Aggregate  (cost=9241443774.00..9241443774.01 rows=1 width=12)





view thread (3+ messages)  latest in thread

Message-ID: <E1TED8q-00047D-Va@wrigleys.postgresql.org>
Permalink:  ../E1TED8q-00047D-Va@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/E1TED8q-00047D-Va@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: l1t@tom.com
  Subject: Re: BUG #7556: "select not in sub query" plan very poor vs "not exists"
  In-Reply-To: <E1TED8q-00047D-Va@wrigleys.postgresql.org>
  References: <E1TED8q-00047D-Va@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox