Skip site navigation (1) Skip section navigation (2)

Re: Query Planning time increased 3 times on 7.1 compared to 7.0.3

From: Christof Petig <christof(at)petig-baender(dot)de>
To: Justin Clift <aa2(at)bigpond(dot)net(dot)au>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Query Planning time increased 3 times on 7.1 compared to 7.0.3
Date: 2001-03-05 14:00:47
Message-ID: 3AA39C0E.9FF0E4C2@petig-baender.de (view raw or flat)
Thread:
Lists: 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



In response to

pgsql-hackers by date

Next:From: Christof PetigDate: 2001-03-05 15:07:04
Subject: Re: Query Planning time increased 3 times on 7.1 compared to 7.0.3
Previous:From: Hannu KrosingDate: 2001-03-05 12:27:45
Subject: Re: Oops! Its bug in parser????

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group