Re: indexes

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: "Chethana, Rao (IE10)" <Chethana(dot)Rao(at)Honeywell(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: indexes
Date: 2006-02-28 14:59:54
Message-ID: 20060228145954.GD535@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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.

In response to

  • indexes at 2006-02-28 14:56:14 from Chethana, Rao (IE10)

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2006-02-28 15:10:02 Re: implicit tables syntax disappeared from 8.0->8.1
Previous Message Chethana, Rao (IE10) 2006-02-28 14:56:14 indexes