Forcing using index instead of sequential scan?

Поиск
Список
Период
Сортировка
От
Тема Forcing using index instead of sequential scan?
Дата
Msg-id D012B9600FFB984AB18C0D53C475A4A081F51B@E03MVZ3-UKDY.domain1.systemhost.net
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: Robert Lor
Дата:
Сообщение: Re: Sun Donated a Sun Fire T2000 to the PostgreSQL
Следующее
От:
Дата:
Сообщение: Re: Forcing using index instead of sequential scan?