index problem

From: "Oleg Lebedev" <oleg(dot)lebedev(at)waterford(dot)org>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: index problem
Date: 2002-06-21 18:59:32
Message-ID: 993DBE5B4D02194382EC8DF8554A5273016CDB@postoffice.waterford.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,
I have an objectid field of type bigint, but when I run queries like:
select * from table where objectid=123;
index is not used on objectid even though it's declared.
However when I run:
select * from table where objectid='123';
index is used.
Is there an option I can set so that postgres starts using indexes on
numberic field without requiring
conversion to varchar?
thanks,

Oleg

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2002-06-21 19:29:27 Re: SQL Challenge: Skip Weekends
Previous Message Jie Liang 2002-06-21 18:32:32 FW: RESTORE A TABLE