Re: Sorting performance vs. MySQL

From: Yang Zhang <yanghatespam(at)gmail(dot)com>
To: Alex Hunsaker <badalex(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Sorting performance vs. MySQL
Date: 2010-02-23 05:55:33
Message-ID: 9066fa251002222155h6526c335mb4a0dc5739a1bde9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Feb 22, 2010 at 9:30 PM, Alex Hunsaker <badalex(at)gmail(dot)com> wrote:
> On Mon, Feb 22, 2010 at 11:10, Yang Zhang <yanghatespam(at)gmail(dot)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/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-02-23 05:57:29 Re: COPY command character set
Previous Message Yang Zhang 2010-02-23 05:51:16 Re: Sorting performance vs. MySQL