Re: Sorting performance vs. MySQL

Поиск
Список
Период
Сортировка
Искать
От
Alex Hunsaker
Тема
Re: Sorting performance vs. MySQL
Дата
Msg-id
34d269d41002221830p300dbe55kdbd002b9804ac6cd@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL Pavel Stehule <pavel.stehule@gmail.com>
Re: Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL Tom Lane <tgl@sss.pgh.pa.us>
Re: Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL Alban Hertroys <dalroi@solfertje.student.utwente.nl>
Re: Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL Frank Heikens <frankheikens@mac.com>
Re: Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL Frank Heikens <frankheikens@mac.com>
Re: Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL Alvaro Herrera <alvherre@commandprompt.com>
Re: Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL Alvaro Herrera <alvherre@commandprompt.com>
Re: Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL Scott Marlowe <scott.marlowe@gmail.com>
Re: Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL Scott Marlowe <scott.marlowe@gmail.com>
Re: Sorting performance vs. MySQL Frank Heikens <frankheikens@mac.com>
Re: Sorting performance vs. MySQL Richard Broersma <richard.broersma@gmail.com>
Re: Sorting performance vs. MySQL Frank Heikens <frankheikens@mac.com>
Re: Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL "Igor Neyman" <ineyman@perceptron.com>
Re: Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL Scott Marlowe <scott.marlowe@gmail.com>
Re: Sorting performance vs. MySQL Scott Marlowe <scott.marlowe@gmail.com>
Re: Sorting performance vs. MySQL Alex Hunsaker <badalex@gmail.com>
Re: Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL Tom Lane <tgl@sss.pgh.pa.us>
Re: Sorting performance vs. MySQL Scott Marlowe <scott.marlowe@gmail.com>
Re: Sorting performance vs. MySQL Yeb Havinga <yebhavinga@gmail.com>
Re: Sorting performance vs. MySQL Tom Lane <tgl@sss.pgh.pa.us>
Re: Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL Scott Marlowe <scott.marlowe@gmail.com>
Re: Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL Tom Lane <tgl@sss.pgh.pa.us>
Re: Sorting performance vs. MySQL Alex Hunsaker <badalex@gmail.com>
Re: Sorting performance vs. MySQL Baron Schwartz <baron@xaprb.com>
Re: Sorting performance vs. MySQL John Gage <jsmgage@numericable.fr>
Re: Sorting performance vs. MySQL Scott Marlowe <scott.marlowe@gmail.com>
Re: Sorting performance vs. MySQL Greg Stark <gsstark@mit.edu>
Re: Sorting performance vs. MySQL Yeb Havinga <yebhavinga@gmail.com>
Re: Sorting performance vs. MySQL Greg Stark <gsstark@mit.edu>
Re: Sorting performance vs. MySQL Yang Zhang <yanghatespam@gmail.com>
Re: Sorting performance vs. MySQL Alex Hunsaker <badalex@gmail.com>
On Mon, Feb 22, 2010 at 11:10, Yang Zhang  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...  But still that means it has almost
nothing with the sort or indexs.  Leaves pretty much your cpu, disk,
filesystem and network...  BTW the first time I did it it had to write
out the hint bits so that took (a bit) longer... Is this freshly
loaded data?

---

# create table metarelcould_transactionlog (
        id serial primary key,
        transactionid integer not null,
        queryid smallint not null,
        tableid varchar(30) not null,
        tupleid integer not null,
        querytype varchar not null,
        graphpartition smallint,
        replicatedpartition smallint,
        justifiedpartition smallint,
        hashpartition smallint,
        modeid integer,
        manualpartition smallint
);

# insert into metarelcould_transactionlog (transactionid, queryid,
tableid, tupleid, querytype, graphpartition, replicatedpartition,
justifiedpartition, hashpartition, modeid, manualpartition) select
foo,  1, 'sometable', 1, 's', 1, 1, 1, 1, 1, 1 from generate_series(1,
50000000) as foo;

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

Time: 79017.186 ms

# create index idx on metarelcould_transactionlog (transactionid);
# select count(1) from (SELECT * from metarelcould_transactionlog
order by transactionid) as foo;
  count
----------
 50000000
(1 row)

Time: 26230.534 ms

# cluster metarelcould_transactionlog USING  idx;
CLUSTER
Time: 342381.535 ms

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

Time: 27704.794 ms
В списке pgsql-general по дате отправления
От: Greg Smith
Дата:
Сообщение: Re: tuning bgwriter in 8.4.2
От: Joe Conway
Дата:
FAQ