From: | Peter Geoghegan <peter(at)2ndquadrant(dot)com> |
---|---|
To: | Marti Raudsepp <marti(at)juffo(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] Make skipped sort explicit in EXPLAIN ANALYZE |
Date: | 2012-05-25 14:39:24 |
Message-ID: | CAEYLb_U2NY9ZbeXuUhqY3dqDxVuumSavdKbOqxYTd29Ew-+TpA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 25 May 2012 15:19, Marti Raudsepp <marti(at)juffo(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-05-25 14:41:23 | Re: pg_dump and thousands of schemas |
Previous Message | Merlin Moncure | 2012-05-25 14:30:47 | Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile |