Re: Index is not used

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "A(dot)Bhuvaneswaran" <bhuvan(at)symonds(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Index is not used
Date: 2003-12-20 04:39:03
Message-ID: 14302.1071895143@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"A.Bhuvaneswaran" <bhuvan(at)symonds(dot)net> writes:
> I have a table and an index on it. The index is used when i use '=3D'
> operator for the indexed field in the where condition. But the index is
> not used when i use '>=3D' operator for the same field.

Unsurprising. An inequality condition may require fetching many rows
(the planner is estimating 336289 rows here...) and so an indexscan is
not necessarily quicker. Have you compared actual runtimes with
enable_seqscan on and off?

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Oliver Elphick 2003-12-20 04:47:07 {Virus?} Re: Debian Install 7.4
Previous Message A.Bhuvaneswaran 2003-12-20 04:28:35 Index is not used