Re: [HACKERS] planner or statistical bug on 8.5

2010-01-12 Thread Tom Lane
Robert Haas writes: > Tom made some changes for 8.5 that will result in materialization > being used in more places, and I think we're seeing that here. The > planner thinks that materializing the inner side of the nestloop will > save it from going to disk for every iteration, but that's not rea

Re: [HACKERS] planner or statistical bug on 8.5

2010-01-12 Thread Robert Haas
On Tue, Jan 12, 2010 at 3:08 AM, Pavel Stehule wrote: > 2010/1/12 Matteo Beccati : >> Il 12/01/2010 08:55, Pavel Stehule ha scritto: >>> >>> I checked query and I was surprised with very strange plan: >>> >>> postgres=# explain select  a, b from a,b,c; >>>                               QUERY PLAN

Re: [HACKERS] planner or statistical bug on 8.5

2010-01-12 Thread Pavel Stehule
2010/1/12 Matteo Beccati : > Il 12/01/2010 08:55, Pavel Stehule ha scritto: >> >> I checked query and I was surprised with very strange plan: >> >> postgres=# explain select  a, b from a,b,c; >>                               QUERY PLAN >>

Re: [HACKERS] planner or statistical bug on 8.5

2010-01-12 Thread Matteo Beccati
Il 12/01/2010 08:55, Pavel Stehule ha scritto: I checked query and I was surprised with very strange plan: postgres=# explain select a, b from a,b,c; QUERY PLAN --- Nested Loop (cost=0.00..2765

Re: [HACKERS] planner or statistical bug on 8.5

2010-01-12 Thread Dann Corbit
> -Original Message- > From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers- > ow...@postgresql.org] On Behalf Of Pavel Stehule > Sent: Monday, January 11, 2010 11:55 PM > To: PostgreSQL Hackers > Cc: Tom Lane > Subject: [HACKERS] planner or statistical

[HACKERS] planner or statistical bug on 8.5

2010-01-11 Thread Pavel Stehule
Hello I checked query and I was surprised with very strange plan: postgres=# create table a(a int primary key); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "a_pkey" for table "a" CREATE TABLE postgres=# create table b(b int primary key); NOTICE: CREATE TABLE / PRIMARY KEY will