Re: [PATCH] Make skipped sort explicit in EXPLAIN ANALYZE

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: [PATCH] Make skipped sort explicit in EXPLAIN ANALYZE
Дата
Msg-id CAEYLb_U2NY9ZbeXuUhqY3dqDxVuumSavdKbOqxYTd29Ew-+TpA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Make skipped sort explicit in EXPLAIN ANALYZE  (Marti Raudsepp <marti@juffo.org>)
Список pgsql-hackers
On 25 May 2012 15:19, Marti Raudsepp <marti@juffo.org> wrote:
> I understand where you're coming from, but personally I think the
> current output is more confusing: "Gee Postgres is stupid, it's
> sorting when there's nothing to sort!"
>
> But let's wait for a third opinion.

I agree with Tom. The idea that you "sort when there's nothing to
sort" is not confusing. Textbook implementations of recursive sorting
algorithms explicitly have a notion of sorting one element, by simply
recognising that one element must already be sorted. For example, look
at the quicksort pseudocode here:

http://en.wikipedia.org/wiki/Quicksort

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services


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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: pg_stat_statements temporary file