Home > Archive > PostgreSQL Discussion > February 2006 > indexes









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author indexes
Chethana, Rao

2006-02-28, 8:28 pm

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 ?




Martijn van Oosterhout

2006-02-28, 8:28 pm

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.


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com