Forcing using index instead of sequential scan? - Mailing list pgsql-performance

From
Subject Forcing using index instead of sequential scan?
Date
Msg-id D012B9600FFB984AB18C0D53C475A4A081F51B@E03MVZ3-UKDY.domain1.systemhost.net
Whole thread Raw
Responses Re: Forcing using index instead of sequential scan?  (Peter Eisentraut <peter_e@gmx.net>)
Re: Forcing using index instead of sequential scan?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Forcing using index instead of sequential scan?  (Mark Kirkwood <markir@paradise.net.nz>)
List pgsql-performance

I have been testing the performance of PostgreSQL using the simple tool found at http://benchw.sourceforge.net however I have found that all the queries it run execute with sequential scans. The website where the code runs has examples of the execution plan using indexes.

When I disable the sequential plan query 0 and query 1 run faster ( http://benchw.sourceforge.net/benchw_results_postgres_history.html ) by using the indexes as suggested by the website.

I have tried increasing the effective_cache_size and reducing the random_page_cost to try and force the optimiser to use the index but it always uses the sequential scan.

What is the best way to force the use of indexes in these queries? Currently testing with version 8.1.4.

Regards

Robin Smith

British Telecommunications plc     Registered office: 81 Newgate Street London EC1A 7AJ

Registered in England no. 1800000

This electronic message contains information from British Telecommunications plc which may be privileged and confidential. The information is intended to be for the use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic message in error, please notify us by telephone or e-mail (to the number or address above) immediately.

pgsql-performance by date:

Previous
From: Robert Lor
Date:
Subject: Re: Sun Donated a Sun Fire T2000 to the PostgreSQL
Next
From:
Date:
Subject: Re: Forcing using index instead of sequential scan?