Re: [HACKERS] wrong query plan in 7.1beta3 - Mailing list pgsql-sql

From Tom Lane
Subject Re: [HACKERS] wrong query plan in 7.1beta3
Date
Msg-id 21888.980612452@sss.pgh.pa.us
Whole thread Raw
In response to wrong query plan in 7.1beta3  (Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>)
List pgsql-sql
Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu> writes:
> There seems to be an optimizer problem in 7.1beta3. The query you can see
> below worked fast in 7.0.2 but in 7.1beta3 is rather slow. The problem is
> that an 'index scan' has been changed to a 'seq scan'. Details:

This is fixed in current sources: I get

Subquery Scan sd_user_grant  (cost=5.16..5.22 rows=1 width=61) ->  Aggregate  (cost=5.16..5.22 rows=1 width=61)
-> Group  (cost=5.16..5.18 rows=3 width=61)             ->  Sort  (cost=5.16..5.16 rows=3 width=61)
-> Nested Loop  (cost=0.00..5.14 rows=3 width=61)                         ->  Seq Scan on pg_shadow  (cost=0.00..1.01
rows=1width=32)                         ->  Index Scan using sd_grant_pkey on sd_grant  (cost=0.00..4.07 rows=3
width=29)
        regards, tom lane


pgsql-sql by date:

Previous
From: Kovacs Zoltan
Date:
Subject: Re: [HACKERS] wrong query plan in 7.1beta3
Next
From: Kovacs Baldvin
Date:
Subject: Architectural question