From: Tom Lane <tgl@sss.pgh.pa.us>
To: A.Bhuvaneswaran <bhuvan@symonds.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Index is not used
Date: Fri, 19 Dec 2003 23:39:03 -0500
Message-ID: <14302.1071895143@sss.pgh.pa.us> (raw)
In-Reply-To: <1071894514.1380.1.camel@Bhuvan.bksys.co.in>
References: <1071894514.1380.1.camel@Bhuvan.bksys.co.in>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, bhuvan@symonds.net
Subject: Re: Index is not used
In-Reply-To: <14302.1071895143@sss.pgh.pa.us>
References: <1071894514.1380.1.camel@Bhuvan.bksys.co.in> <14302.1071895143@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox