Re: trouble with (lack of) indexing

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: trouble with (lack of) indexing
Дата
Msg-id 29295.1021050056@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: trouble with (lack of) indexing  (Scott Marlowe <scott.marlowe@ihs.com>)
Список pgsql-general
Scott Marlowe <scott.marlowe@ihs.com> writes:
> You can change the setting of enable_seqscan and enable_indexscan to force
> your planner to ignore one or the other, and time the output.  It's pretty
> easy to do a quick timing test like so:

> time psql -c 'set enable_seqscan=off;select * from tellers' >/dev/null

It's difficult to get accurate measurements that way.  I'd recommend
using 7.2's EXPLAIN ANALYZE instead, and looking at the total runtime
it displays.

Even with EXPLAIN ANALYZE, I'd recommend repeating the command a couple
of times to see how much the runtime varies before you trust the results
very far.  Disk caching can cause the second execution to take far less
time than the first, even with the identical plan.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Subject: bool / vacuum full bug followup part 2
Следующее
От: "shey sewani"
Дата:
Сообщение: General Question About Indexes