Re: Forcing using index instead of sequential scan?

Поиск
Список
Период
Сортировка
От Mark Kirkwood
Тема Re: Forcing using index instead of sequential scan?
Дата
Msg-id 44C2EF69.4020408@paradise.net.nz
обсуждение исходный текст
Ответ на Forcing using index instead of sequential scan?  (<robin.c.smith@bt.com>)
Список pgsql-performance
robin.c.smith@bt.com wrote:
> 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.
>
>

Hi Robin,


Being responsible for this piece of software, I should try to help, only
saw this now sorry (nice to see someone using this).

Unless you really want to reproduce the numbers on the website, it is
best to test with Benchw's scale factor at least 2 x your physical ram,
as this makes the planner's defaults work more sensibly (and models
*most* real world data warehouse situations better!).

Cheers

Mark

В списке pgsql-performance по дате отправления:

Предыдущее
От: Mark Kirkwood
Дата:
Сообщение: Re: Forcing using index instead of sequential scan?
Следующее
От: Michael Stone
Дата:
Сообщение: Re: Forcing using index instead of sequential scan?