Re: Index is not used - Mailing list pgsql-admin

From Tom Lane
Subject Re: Index is not used
Date
Msg-id 14302.1071895143@sss.pgh.pa.us
Whole thread Raw
In response to Index is not used  ("A.Bhuvaneswaran" <bhuvan@symonds.net>)
Responses Re: Index is not used
List pgsql-admin
"A.Bhuvaneswaran" <bhuvan@symonds.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

pgsql-admin by date:

Previous
From: "A.Bhuvaneswaran"
Date:
Subject: Index is not used
Next
From: Oliver Elphick
Date:
Subject: {Virus?} Re: Debian Install 7.4