From: Gary Doades <gpd@gpdnet.co.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: [HACKERS] qsort again (was Re: Strange Create Index
Date: Thu, 16 Feb 2006 15:42:36 -0000 (GMT)
Message-ID: <4383.84.92.210.49.1140104556.squirrel@www.gpdnet.co.uk> (raw)
In-Reply-To: <27898.1140100960@sss.pgh.pa.us>
References: <43F38867.6010701@gpdnet.co.uk>
<19510.1140036968@sss.pgh.pa.us>
<19779.1140038874@sss.pgh.pa.us>
<43F39E53.1020009@gpdnet.co.uk>
<20781.1140046109@sss.pgh.pa.us>
<43F3BF72.6000202@gpdnet.co.uk>
<21152.1140049020@sss.pgh.pa.us>
<21455.1140051584@sss.pgh.pa.us>
<2417.84.92.210.49.1140087992.squirrel@www.gpdnet.co.uk>
<27898.1140100960@sss.pgh.pa.us>
> "Gary Doades" <gpd@gpdnet.co.uk> writes:
>> 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?
>
> Very probable. Do you want to test the theory by jacking that up? ;-)
Hmm, played around a bit. I have managed to get it to do a sort on one of
the "bad" columns using a select of two whole tables that results in a
sequntial scan, sort and merge join. I also tried a simple select column
order by column for a bad column.
I tried varying maintenance_work_mem and work_mem up and down between 2048
and 65536 but I always get similar results. The sort phase always takes 4
to 5 seconds which seems about right for 900,000 rows.
This was on a colunm that took 12 minutes to create an index on.
I've no idea why it should behave this way, but probably explains why I
(and others) may not have noticed it before.
Regards,
Gary.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: gpd@gpdnet.co.uk, tgl@sss.pgh.pa.us
Subject: Re: [HACKERS] qsort again (was Re: Strange Create Index
In-Reply-To: <4383.84.92.210.49.1140104556.squirrel@www.gpdnet.co.uk>
References: <43F38867.6010701@gpdnet.co.uk> <19510.1140036968@sss.pgh.pa.us> <19779.1140038874@sss.pgh.pa.us> <43F39E53.1020009@gpdnet.co.uk> <20781.1140046109@sss.pgh.pa.us> <43F3BF72.6000202@gpdnet.co.uk> <21152.1140049020@sss.pgh.pa.us> <21455.1140051584@sss.pgh.pa.us> <2417.84.92.210.49.1140087992.squirrel@www.gpdnet.co.uk> <27898.1140100960@sss.pgh.pa.us> <4383.84.92.210.49.1140104556.squirrel@www.gpdnet.co.uk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox