Fwd: Btree doesn't work with ">" condition

From: Paolo Cassago <paolo(dot)cassago(at)talentmanager(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Fwd: Btree doesn't work with ">" condition
Date: 2001-11-16 14:08:31
Message-ID: 20011116140831.8449.cpmta@c000.lhr.cp.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
I'm testing PostgreSQL, version 7.1.2, and I create a table, test1, with these kind of fields:

CREATE TABLE test1 (
id integer,
content varchar
);

with 800.000 records, and a btree index setted on the id field.

I noticed the query uses the index for "=" and "<" operators, but if the value used for the "<" operator is higher (600.000 for example), the query makes a seq scan of the table, and the index never works with the ">" operator. Am I managing the indexes well ?

Thanks for the help.

Ciao Paolo

Paolo Cassago

TalentManager
Milan, Paris, Madrid

Tel: +39 02 83 11 23 1
Fax: +39 02 700 43 99 81
Mob: +39 348 82 155 81

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-11-16 15:17:18 Re: ecpg test problem
Previous Message Alex Avriette 2001-11-16 14:00:46 Re: Super Optimizing Postgres