Re: Sorting performance vs. MySQL - Mailing list pgsql-general

From Tom Lane
Subject Re: Sorting performance vs. MySQL
Date
Msg-id 1079.1266871463@sss.pgh.pa.us
Whole thread Raw
In response to Re: Sorting performance vs. MySQL  (Yang Zhang <yanghatespam@gmail.com>)
Responses Re: Sorting performance vs. MySQL
List pgsql-general
Yang Zhang <yanghatespam@gmail.com> writes:
> On Mon, Feb 22, 2010 at 1:13 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>> the speed depends on setting of working_memory. Try to increase a working_memory

> It's already at
>  20000kB

According to your original posting, you're trying to sort something like
a gigabyte of data.  20MB is peanuts.  I wouldn't recommend increasing
the value across-the-board, but setting it to several hundred meg for
this particular query might help.  How much RAM in your machine anyway?

Also, the fact that mysql is faster suggests that having an index does help.
Possibly the data is nearly ordered by transactionid, in which case an
indexscan would not have random-access problems and would be much faster
than an explicit sort.

            regards, tom lane

pgsql-general by date:

Previous
From: Yeb Havinga
Date:
Subject: Re: Sorting performance vs. MySQL
Next
From: Scott Marlowe
Date:
Subject: Re: Sorting performance vs. MySQL