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

From Yang Zhang
Subject Re: Sorting performance vs. MySQL
Date
Msg-id 9066fa251002222155h6526c335mb4a0dc5739a1bde9@mail.gmail.com
Whole thread Raw
In response to Re: Sorting performance vs. MySQL  (Alex Hunsaker <badalex@gmail.com>)
Responses Re: Sorting performance vs. MySQL
List pgsql-general
On Mon, Feb 22, 2010 at 9:30 PM, Alex Hunsaker <badalex@gmail.com> wrote:
> On Mon, Feb 22, 2010 at 11:10, Yang Zhang <yanghatespam@gmail.com> wrote:
>> I have the exact same table of data in both MySQL and Postgresql. In ?> Postgresql:
>
> FWIW on a stock (unchanged postgresql.conf) 8.3.9 I get (best of 3
> runs) 79 seconds, 26 using an index and 27 seconds with it clustered.
> Now yes it goes a lot faster because im skipping all the overhead of
> sending the data to the client...

Last sentence also contributed to my realizing the problem (the client
I was using was psql), but there's one oddity....

> # select count(1) from (SELECT * from metarelcould_transactionlog
> order by transactionid) as foo;

Does it strike anyone else that the query optimizer/rewriter should be
able to toss out the sort from such a query altogether?
--
Yang Zhang
http://www.mit.edu/~y_z/

pgsql-general by date:

Previous
From: Yang Zhang
Date:
Subject: Re: Sorting performance vs. MySQL
Next
From: Tom Lane
Date:
Subject: Re: COPY command character set