On Fri, Nov 20, 2015 at 12:54 AM, Peter Geoghegan <p...@heroku.com> wrote: > * One run can be created with replacement selection, where a > hyrbid-sort merge strategy needs to create and then merge many runs. > When I started work on this patch, I was pretty sure that case would > be noticeably regressed. I was wrong.
Hm. Have you tested a nearly-sorted input set around 1.5x the size of work_mem? That should produce a single run using the heap to generate runs but generate two runs if, AIUI, you're just filling work_mem, running quicksort, dumping that run entirely and starting fresh. I don't mean to say it's representative but if you're looking for a worst case... -- greg -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers