Re: [HACKERS] qsort again (was Re: Strange Create Index

Поиск
Список
Период
Сортировка
Искать
От
Gary Doades
Тема
Re: [HACKERS] qsort again (was Re: Strange Create Index
Дата
Msg-id
2417.84.92.210.49.1140087992.squirrel@www.gpdnet.co.uk
Ответ на
Список
Дерево обсуждения
Strange Create Index behaviour Gary Doades <gpd@gpdnet.co.uk>
Re: Strange Create Index behaviour Simon Riggs <simon@2ndquadrant.com>
Re: Strange Create Index behaviour Tom Lane <tgl@sss.pgh.pa.us>
Re: Strange Create Index behaviour Simon Riggs <simon@2ndquadrant.com>
Re: Strange Create Index behaviour Tom Lane <tgl@sss.pgh.pa.us>
Re: Strange Create Index behaviour Tom Lane <tgl@sss.pgh.pa.us>
Re: Strange Create Index behaviour Gary Doades <gpd@gpdnet.co.uk>
Re: Strange Create Index behaviour Tom Lane <tgl@sss.pgh.pa.us>
Re: Strange Create Index behaviour Simon Riggs <simon@2ndquadrant.com>
qsort again (was Re: Strange Create Index behaviour) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] qsort again (was Re: Strange Create Index Neil Conway <neilc@samurai.com>
Re: [HACKERS] qsort again Florian Weimer <fw@deneb.enyo.de>
Re: [HACKERS] qsort again Martijn van Oosterhout <kleptog@svana.org>
Re: [HACKERS] qsort again Sven Geisler <sgeisler@aeccom.com>
Re: [HACKERS] qsort again Ron <rjpeace@earthlink.net>
Re: qsort again (was Re: Strange Create Index behaviour) Tom Lane <tgl@sss.pgh.pa.us>
Poor performance o "Craig A. James" <cjames@modgraph-usa.com>
Re: Poor performance o Tom Lane <tgl@sss.pgh.pa.us>
Re: Poor performance o "Craig A. James" <cjames@modgraph-usa.com>
Re: Poor performance o Tom Lane <tgl@sss.pgh.pa.us>
Re: Poor performance o "Jim C. Nasby" <jnasby@pervasive.com>
Re: qsort again (was Re: Strange Create Index behaviour) Gary Doades <gpd@gpdnet.co.uk>
Re: qsort again (was Re: Strange Create Index behaviour) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] qsort again (was Re: Strange Create Index behaviour) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] qsort again (was Re: Strange Create Index behaviour) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] qsort again (was Re: Strange Create Index Simon Riggs <simon@2ndquadrant.com>
Re: [HACKERS] qsort again (was Re: Strange Create Index "Gary Doades" <gpd@gpdnet.co.uk>
Re: [HACKERS] qsort again (was Re: Strange Create Index behaviour) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] qsort again (was Re: Strange Create Index "Gary Doades" <gpd@gpdnet.co.uk>
Re: qsort again (was Re: Strange Create Index behaviour) Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: qsort again (was Re: Strange Create Index Ron <rjpeace@earthlink.net>
Re: qsort again (was Re: Strange Create Index behaviour) Tom Lane <tgl@sss.pgh.pa.us>
Re: qsort again (was Re: Strange Create Index Ron <rjpeace@earthlink.net>
Re: qsort again (was Re: Strange Create Index "Steinar H. Gunderson" <sgunderson@bigfoot.com>
Re: qsort again (was Re: Strange Create Index Neil Conway <neilc@samurai.com>
Re: qsort again (was Re: Strange Create Index Ron <rjpeace@earthlink.net>
Re: [HACKERS] qsort again (was Re: Strange Create Index Martijn van Oosterhout <kleptog@svana.org>
Re: [HACKERS] qsort again (was Re: Strange Create Ron <rjpeace@earthlink.net>
Re: [HACKERS] qsort again (was Re: Strange Create Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] qsort again (was Re: Strange Create Ron <rjpeace@earthlink.net>
Re: [HACKERS] qsort again (was Re: Strange Create Martijn van Oosterhout <kleptog@svana.org>
Re: [HACKERS] qsort again (was Re: Strange Create Scott Lamb <slamb@slamb.org>
Re: [HACKERS] qsort again (was Re: Strange Create Ron <rjpeace@earthlink.net>
Re: [HACKERS] qsort again (was Re: Strange Create Ron <rjpeace@earthlink.net>
Re: [HACKERS] qsort again (was Re: Strange Create Ragnar <gnari@hive.is>
Re: [HACKERS] qsort again (was Re: Strange Create Ron <rjpeace@earthlink.net>
Re: [HACKERS] qsort again (was Re: Strange Create Ragnar <gnari@hive.is>
Re: [HACKERS] qsort again (was Re: Strange Create "Gregory Maxwell" <gmaxwell@gmail.com>
Re: [HACKERS] qsort again (was Re: Strange Create Markus Schaber <schabi@logix-tt.com>
Re: [HACKERS] qsort again (was Re: Strange Create Ron <rjpeace@earthlink.net>
Re: [HACKERS] qsort again (was Re: Strange Create Martijn van Oosterhout <kleptog@svana.org>
Re: [HACKERS] qsort again (was Re: Strange Create Ron <rjpeace@earthlink.net>
Re: [HACKERS] qsort again (was Re: Strange Create PFC <lists@peufeu.com>
Re: qsort again (was Re: Strange Create Index Markus Schaber <schabi@logix-tt.com>
Re: [HACKERS] qsort again (was Re: Strange Create Index "Jonah H. Harris" <jonah.harris@gmail.com>
Re: qsort again (was Re: Strange Create Index "Craig A. James" <cjames@modgraph-usa.com>
Re: [HACKERS] qsort again (was Re: Strange Create Index Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] qsort again (was Re: Strange Create Index Mark Lewis <mark.lewis@mir3.com>
Re: [HACKERS] qsort again (was Re: Strange Create Index Martijn van Oosterhout <kleptog@svana.org>
Re: [HACKERS] qsort again (was Re: Strange Create Index Markus Schaber <schabi@logix-tt.com>
Re: [HACKERS] qsort again (was Re: Strange Create Index Greg Stark <gsstark@mit.edu>
Re: [HACKERS] qsort again (was Re: Strange Create Index Mark Lewis <mark.lewis@mir3.com>
Re: [HACKERS] qsort again (was Re: Strange Create Index David Lang <dlang@invendra.net>
Re: [HACKERS] qsort again (was Re: Strange Create Index Mark Lewis <mark.lewis@mir3.com>
Re: [HACKERS] qsort again (was Re: Strange Create Index Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] qsort again (was Re: Strange Create Index Markus Schaber <schabi@logix-tt.com>
Re: [HACKERS] qsort again (was Re: Strange Create Index Scott Lamb <slamb@slamb.org>
Re: [HACKERS] qsort again (was Re: Strange Create Index Martijn van Oosterhout <kleptog@svana.org>
Re: [HACKERS] qsort again (was Re: Strange Create Index PFC <lists@peufeu.com>
Re: [HACKERS] qsort again (was Re: Strange Create Index "Steinar H. Gunderson" <sgunderson@bigfoot.com>
Re: [HACKERS] qsort again (was Re: Strange Create Index Markus Schaber <schabi@logix-tt.com>
Re: Strange Create Index behaviour Gary Doades <gpd@gpdnet.co.uk>
Re: Strange Create Index behaviour Gary Doades <gpd@gpdnet.co.uk>
Re: Strange Create Index behaviour Gary Doades <gpd@gpdnet.co.uk>
Tom Lane wrote:
> I increased the size of the test case by 10x (basically s/100000/1000000/)
> which is enough to push it into the external-sort regime.  I get
> amazingly stable runtimes now --- I didn't have the patience to run 100
> trials, but in 30 trials I have slowest 11538 msec and fastest 11144 msec.
> So this code path is definitely not very sensitive to this data
> distribution.
>
> While these numbers aren't glittering in comparison to the best-case
> qsort times (~450 msec to sort 10% as much data), they are sure a lot
> better than the worst-case times.  So maybe a workaround for you is
> to decrease maintenance_work_mem, counterintuitive though that be.
> (Now, if you *weren't* using maintenance_work_mem of 100MB or more
> for your problem restore, then I'm not sure I know what's going on...)
>

Good call. I basically reversed your test by keeping the number of rows
the same (200000), but reducing maintenance_work_mem. Reducing to 8192
made no real difference. Reducing to 4096 flattened out all the times
nicely. Slower overall, but at least predictable. Hopefully only a
temporary solution until qsort is fixed.

My restore now takes 22 minutes :)

I think the reason I wasn't seeing performance issues with normal sort
operations is because they use work_mem not maintenance_work_mem which was
only set to 2048 anyway. Does that sound right?

Regards,
Gary.


В списке pgsql-performance по дате отправления
От: Ron
Дата:
От: Steinar H. Gunderson
Дата:
FAQ