[BUGS] BUG #7556: "select not in sub query" plan very poor vs "not exists"

2012-09-19 Thread l1t
The following bug has been logged on the website: Bug reference: 7556 Logged by: lt Email address: l...@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 s

[BUGS] BUG #7556 addition info

2012-09-20 Thread l1t
plan of http://archives.postgresql.org/pgsql-bugs/2012-09/msg00222.php 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<5); QUERY PLAN ---

[BUGS] RE:Re: BUG #7556 addition info

2012-10-03 Thread l1t
My Server has 4GB mem and OS is Windows 2008 R2. I downloaded the latest version,and the cost of "not in" is much higher than that of "not exist".Please see attachment for detail. As the time of query is very long,I didn't get the explain analyze result. I think the id columns of table a and b are

[BUGS] RE:Re: BUG #7556 addition info

2012-10-03 Thread l1t
I downloaded the latest version,and the cost of "not in" is much higher than that of "not exist". please see attachment for detail. As the time of query is very long,I didn't get the explain analyze result. I think the id columns of table a and b are not null, so the query of "not in" and "not