Re: indexes - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: indexes
Date
Msg-id 20060228145954.GD535@svana.org
Whole thread Raw
In response to indexes  ("Chethana, Rao (IE10)" <Chethana.Rao@Honeywell.com>)
List pgsql-general
On Tue, Feb 28, 2006 at 07:56:14AM -0700, Chethana, Rao (IE10) wrote:
> Hello!
>
> i tried creating indexes on columns that have datatype as bigint  or
> smallint , but  when I performed explain analyze,  the query was using
> sequential scan
>
>  instead of index scanning.
>
> Is it not possible to create indexes for attributes whose datatypes  r
> bigint or smallint ?

On older versions of PostgreSQL you had to quote the integers to get it
to use an index scan. Recent versions don't have this problem anymore.
It could also have to do with the size of your table. However, since
you don't provide any useful details, I'm just speculating.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: "Chethana, Rao (IE10)"
Date:
Subject: indexes
Next
From: pg@os10000.net
Date:
Subject: implicit tables syntax disappeared from 8.0->8.1