Skip site navigation (1) Skip section navigation (2)

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

From: "Gary Doades" <gpd(at)gpdnet(dot)co(dot)uk>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: [HACKERS] qsort again (was Re: Strange Create Index
Date: 2006-02-16 15:42:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-performance
> "Gary Doades" <gpd(at)gpdnet(dot)co(dot)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.


In response to

pgsql-performance by date

Next:From: RonDate: 2006-02-16 15:52:48
Subject: Re: qsort again (was Re: [PERFORM] Strange Create
Previous:From: Martijn van OosterhoutDate: 2006-02-16 14:48:33
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-02-16 15:52:19
Subject: Re: Generating config stuff from single source
Previous:From: Tom LaneDate: 2006-02-16 14:48:54
Subject: Re: [HACKERS] Patch Submission Guidelines

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group