Re: Forcing using index instead of sequential scan?

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Forcing using index instead of sequential scan?
Дата
Msg-id 87slktteng.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Forcing using index instead of sequential scan?  ("Craig A. James" <cjames@modgraph-usa.com>)
Список pgsql-performance
"Craig A. James" <cjames@modgraph-usa.com> writes:

> This causes massive file-system activity and flushes all files that the
> kernel has cached. If you run this between each Postgres test (let it run
> for a couple minutes), it gives you an apples-to-apples comparison between
> successive benchmarks, and eliminates the effects of caching.

On Linux at least the best way to flush the cache is to unmount and then mount
the filesystem. This requires putting the data files on partition that you
aren't otherwise using and shutting down postgres.

Note that "nothing cached" isn't necessarily any more accurate a model as
"everything cached". In reality many databases *do* in fact run the same
queries over and over again, though often with some parameters different each
time. But the upper pages of most indexes and many of the common leaf pages
and heap pages will in fact be cached.


--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

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

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