Re: Buglet in "Sort Method" explain output in degenerate case

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: PostgreSQL-development Hackers <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Buglet in "Sort Method" explain output in degenerate case
Date: 2007-09-01 18:50:05
Message-ID: 24125.1188672605@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

I wrote:
> Hmm. Actually, given that sort_bounded_heap() is only conditionally
> invoked, *both* of the state updates it makes are bogus.

Er, make that three state updates: its REVERSEDIRECTION() operation is
being skipped as well. That's not critical now, but might be someday.

Rather than moving all that up to tuplesort_performsort, it seems better
to leave it where it is, and instead remove the premature optimization
of trying to skip sort_bounded_heap. The number of cycles saved that
way is tiny anyway...

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Gregory Stark 2007-09-01 20:43:42 Re: Buglet in "Sort Method" explain output in degenerate case
Previous Message Tom Lane 2007-09-01 18:19:53 Re: Buglet in "Sort Method" explain output in degenerate case