Re: Query Planning time increased 3 times on 7.1 compared to 7.0.3 - Mailing list pgsql-hackers

From Christof Petig
Subject Re: Query Planning time increased 3 times on 7.1 compared to 7.0.3
Date
Msg-id 3AA3AB98.F0C2D13F@petig-baender.de
Whole thread Raw
In response to Query Planning time increased 3 times on 7.1 compared to 7.0.3  (Christof Petig <christof.petig@wtal.de>)
List pgsql-hackers
Justin Clift wrote:

> Hi Christof,
>
> I'm not aware of the problem with int2 indexes collapsing.  Can you give
> me some more info, and I'll put it on the techdocs.postgresql.org
> website.

Oh, I'm sorry for my strange wording.

I said that the index search collapses to a sequential scan if you do
not
cast the number to int2.

Because an int2 index is not used to look up an int4.
And untyped numbers are int4 or numeric the int2 index is never used
unless
explicitely specified (by a type cast).
Yes this is a known bug in PostgreSQL 7.1 and below. Hopefully this will
get addressed in 7.2?
Why don't I code it? I'm busy working on ecpg (dyn. SQL) at the moment.

Christof


pgsql-hackers by date:

Previous
From: Vadim Mikheev
Date:
Subject: RE: [CORE] WAL & RC1 status
Next
From: Zeugswetter Andreas SB
Date:
Subject: AW: Query Planning time increased 3 times on 7.1 compar ed to 7.0.3