Tycho,You saved us! 
This problem really bothered us for a while, now we know why we had hard
time before. But I think it is a postgres bug. Thanks a lot!

Anna Zhang

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 5:29 PM
To: Zhang, Anna
Cc: '[EMAIL PROTECTED]'
Subject: Re: [ADMIN] seq scan on indexed column


On Thu, 14 Mar 2002, Zhang, Anna wrote:

> gtld_analysis=# explain SELECT NETBLOCK_START
> gtld_analysis-# FROM GTLD_OWNER
> gtld_analysis-# WHERE NETBLOCK_START = -2147483648;

You might want to try the same query but with the constant integer
enclosed in single quotes.  I find that (at least for int8) this changes
the behaviour wrt index usage -- most probably due to automatic
typecasting in the postgresql SQL parser.

Hope this helps...
Tycho

-- 
Tycho Fruru                     [EMAIL PROTECTED]
Users' impressions of different operating systems, expressed as emoticons:
Linux:   :)
Windows: XP

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to