Re: The planner chooses seqscan+sort when there is an

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: The planner chooses seqscan+sort when there is an
Дата
Msg-id 20060503184525.GA14628@webserv.wug-glas.de
обсуждение исходный текст
Ответ на Re: The planner chooses seqscan+sort when there is an  ("Florian G. Pflug" <fgp@phlo.org>)
Список pgsql-general
am  03.05.2006, um 20:20:55 +0200 mailte Florian G. Pflug folgendes:
> >of the index scan ? The table is quite big, might be possible. I still
> >wonder why would be seqscan+sort faster than index scan... the sort will
> >for sure have to write to disk too given the size of the table...
>
> When using an indexscan, postgres will read the actual rows in index-order,
> rathen then in the order they appear on-disk.
> For 200 million rows this means doing at least 200 million
> disk seeks. Assuming that each seek takes just 1ms, thats
> still amount to 200.000 seconds.

Yepp, it is much cheaper to read the table seq and order later.


Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47215,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===

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

Предыдущее
От: Geoffrey
Дата:
Сообщение: How does an application recognize the death of the postmaster
Следующее
От: Sven Willenberger
Дата:
Сообщение: Re: out of memory for query result