Re: [INTERFACES] Index unused with OR? - Mailing list pgsql-interfaces

From Teodorescu Constantin
Subject Re: [INTERFACES] Index unused with OR?
Date
Msg-id 199805141341.QAA02105@flex.flex.ro
Whole thread Raw
In response to Index unused with OR?  ("Olaf Mittelstaedt" <mstaedt@va-sigi.va.fh-ulm.de>)
Responses Re: Index unused with OR?
List pgsql-interfaces
The index is used only if scanning the index is faster than scanning the table itself. Trying the index only with a
coupleof records isn't good. 

Try inserting some hundred records inside and VACUUM the database after.

When you vacuum the database you are updating the statistics table used by the query optimizer. The query optimizer
willchoose to use an index when it found that it worths. 

Not using the index in OR queries was some-time ago a bug in PostgreSQL 6.1 if my memory is good. Think that has been
solvedin new releases, am I wrong ? 

Constantin Teodorescu
FLEX Consulting Braila, ROMANIA


pgsql-interfaces by date:

Previous
From: Byron Nikolaidis
Date:
Subject: Re: [INTERFACES] ODBC-Interface (PostODBC) and Postgres 6.3.2
Next
From: "Olaf Mittelstaedt"
Date:
Subject: Re: Index unused with OR?