Re: why my query is not using index??

Поиск
Список
Период
Сортировка
От Francisco Reyes
Тема Re: why my query is not using index??
Дата
Msg-id 20041012005231.U98867@zoraida.natserv.net
обсуждение исходный текст
Ответ на Re: why my query is not using index??  (John Meinel <john@johnmeinel.com>)
Ответы Re: why my query is not using index??
Список pgsql-performance
On Mon, 11 Oct 2004, John Meinel wrote:

> Postgres believes that it will cost 382 to do a sequential scan, versus 490
> for an indexed scan. Hence why it prefers to do the sequential scan. Try
> running explain analyze to see if how accurate it is.

With explain analyze I have with sequential scan on
Sort  (cost=382.01..382.15 rows=56 width=196)
(actual time=64.346..64.469 rows=24 loops=1)


And with seqscan off
Sort  (cost=490.82..490.96 rows=56 width=196)
(actual time=56.668..56.789 rows=24 loops=1)

So I guess that for this particular query I am better off setting the
seqscan off.

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Normal case or bad query plan?
Следующее
От: Francisco Reyes
Дата:
Сообщение: Re: Understanding explains