Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 9B83B4778E7 for ; Fri, 21 Jun 2002 16:55:38 -0400 (EDT) Received: from postoffice.waterford.org (postoffice.waterford.org [205.124.117.39]) by postgresql.org (Postfix) with ESMTP id C6353478B35 for ; Fri, 21 Jun 2002 14:59:31 -0400 (EDT) X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C21955.C739AF9A" Subject: index problem Date: Fri, 21 Jun 2002 12:59:32 -0600 Message-ID: <993DBE5B4D02194382EC8DF8554A5273016CDB@postoffice.waterford.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: index problem Thread-Index: AcIZVd7Of8POytc0SUuJPZBrfhfBng== From: "Oleg Lebedev" To: X-Archive-Number: 200206/321 X-Sequence-Number: 8286 This is a multi-part message in MIME format. ------_=_NextPart_001_01C21955.C739AF9A Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I have an objectid field of type bigint, but when I run queries like: select * from table where objectid=3D123; index is not used on objectid even though it's declared. However when I run: select * from table where objectid=3D'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, =20 Oleg ------_=_NextPart_001_01C21955.C739AF9A Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message
Hi,
I have an= objectid=20 field of type bigint, but when I run queries like:
select * = from table=20 where objectid=3D123;
index is = not used on=20 objectid even though it's declared.
However w= hen I=20 run:
select * = from table=20 where objectid=3D'123';
index is= =20 used.
Is there = an=20 option I can set so that postgres starts using indexes on numberic fie= ld=20 without requiring
conversio= n to=20 varchar?
thanks,
 
Oleg
=00 ------_=_NextPart_001_01C21955.C739AF9A--