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

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Paolo Cassago <paolo(dot)cassago(at)talentmanager(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Btree doesn't work with ">" condition
Date: 2001-11-20 19:54:30
Message-ID: 3BFAB4F6.40604@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Paolo Cassago wrote:

>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 ?
>
Have you run VACUUM ANALYZE lately ?

What does EXPLAIN think of the costs ?

-------------
Hannu

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2001-11-20 19:57:00 Re: OCTET_LENGTH is wrong
Previous Message Hannu Krosing 2001-11-20 19:52:16 Re: OCTET_LENGTH is wrong