Unused Indexes - Mailing list pgsql-general

From Tim McAuley
Subject Unused Indexes
Date
Msg-id 3F27BE36.2090508@tcd.ie
Whole thread Raw
Responses Re: Unused Indexes  (Mike Mascari <mascarm@mascari.com>)
Re: Unused Indexes  (DeJuan Jackson <djackson@speedfc.com>)
List pgsql-general
Hi,

I have a table which I have populated with over 5000 entries. There is a
combined  index placed on two of the columns (both bigint). I am trying
a simple select (i.e. select id where col1 = 1 and col2 = 1) covering
these  two columns and it keeps using a seq scan. Is this correct? I
would have thought that with this number of entries that an index scan
should be used.

I am testing this using postgresql 7.3.3 on windows 2000 using cygwin.

Doing "set enable_seqscan to off" does not change the results of the
explain operation.

I also tried setting a single index on just one of the columns and
running an appropriate search; it still uses a seq scan. At what stage
will the planner normally start using an index scan?

Any hints appreciated.

Tim






pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: ERROR STRINGS IN PGSQL
Next
From: Mike Mascari
Date:
Subject: Re: Unused Indexes