Re: [HACKERS] strange plan - PostgreSQL 9.2

2012-02-28 Thread Pavel Stehule
2012/2/28 Tom Lane : > Pavel Stehule writes: >> Why there are a SubPlan 2? > > http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=bd3daddaf232d95b0c9ba6f99b0170a0147dd8af > >                        regards, tom lane Thank you - I can verify so it works well, but a EXPLAIN result is

Re: [HACKERS] strange plan - PostgreSQL 9.2

2012-02-28 Thread Tom Lane
Pavel Stehule writes: > Why there are a SubPlan 2? http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=bd3daddaf232d95b0c9ba6f99b0170a0147dd8af regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

[HACKERS] strange plan - PostgreSQL 9.2

2012-02-28 Thread Pavel Stehule
Hello I try to look on one slow query with correlated subquery: create table xx(a int primary key); create table yy(a int); insert into xx select generate_series(1,100); insert into yy select (random()*100)::int from generate_series(1,10); create index on yy(a); Query A select a, (