Re: sorting problem

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: sorting problem
Дата
Msg-id 87mzwckfyp.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: sorting problem  (Bruno Wolff III <bruno@wolff.to>)
Ответы Re: sorting problem
Список pgsql-general
Bruno Wolff III <bruno@wolff.to> writes:

> Using an index to do an order by is an order N operation.

No, using an index to do an order by is actually still n*log(n). You have to
traverse all the parent pages in the binary tree of the index as well.

This only goes to show how small the log(n) component of the order is. It's
easily dwarfed by large constants such as the difference in i/o efficiency
from non-contiguous reads.

--
greg

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Scheduler in Postgres
Следующее
От: Tom Lane
Дата:
Сообщение: Re: sorting problem