X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 05B289DC9F2 for ; Thu, 22 Dec 2005 03:08:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 28535-03 for ; Thu, 22 Dec 2005 03:08:09 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.mi8.com (d01gw04.mi8.com [63.240.6.44]) by postgresql.org (Postfix) with ESMTP id 084289DCCCE for ; Thu, 22 Dec 2005 03:08:06 -0400 (AST) Received: from 172.16.1.26 by mail.mi8.com with ESMTP (- Welcome to Mi8 Corporation www.Mi8.com (D4)); Thu, 22 Dec 2005 02:07:50 -0500 X-Server-Uuid: C8FB4D43-1108-484A-A898-3CBCC7906230 Received: from MI8NYCMAIL06.Mi8.com ([172.16.1.175]) by D01HOST01.Mi8.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 22 Dec 2005 02:07:24 -0500 Received: from 69.181.100.71 ([69.181.100.71]) by MI8NYCMAIL06.Mi8.com ( [172.16.1.219]) via Exchange Front-End Server mi8owa.mi8.com ( [172.16.1.104]) with Microsoft Exchange Server HTTP-DAV ; Thu, 22 Dec 2005 07:07:23 +0000 User-Agent: Microsoft-Entourage/11.2.1.051004 Date: Wed, 21 Dec 2005 23:07:22 -0800 Subject: Re: MySQL is faster than PgSQL but a large margin in From: "Luke Lonergan" To: "Madison Kelly" , "Stephen Frost" cc: pgsql-performance@postgresql.org Message-ID: Thread-Topic: [PERFORM] MySQL is faster than PgSQL but a large margin in my Thread-Index: AcYGxVa/D8+MMfkBQf2EHzkChoHvrAAAQPYs In-Reply-To: <43AA4EAB.9080507@alteeve.com> MIME-Version: 1.0 X-OriginalArrivalTime: 22 Dec 2005 07:07:24.0085 (UTC) FILETIME=[5BD89650:01C606C6] X-WSS-ID: 6FB48F263ZO9007050-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.287 required=5 tests=[AWL=0.034, RCVD_NUMERIC_HELO=1.253] X-Spam-Score: 1.287 X-Spam-Level: * X-Archive-Number: 200512/563 X-Sequence-Number: 16384 Madison, On 12/21/05 10:58 PM, "Madison Kelly" wrote: > Ah, that makes a lot of sense (I read about the 'fsync' issue before, > now that you mention it). I am not too familiar with MySQL but IIRC > MyISAM is their open-source DB and InnoDB is their commercial one, ne? > If so, then I am running MyISAM. You can run either storage method with MySQL, I expect the default is MyISAM. COPY performance with or without fsync was sped up recently nearly double in Postgresql. The Bizgres version (www.bizgres.org, www.greenplum.com) is the fastest, Postgres 8.1.1 is close, depending on how fast your disk I/O is (as I/O speed increases Bizgres gets faster). fsync isn't really an "issue" and I'd suggest you not run without it! We've found that "fdatasync" as the wal sync method is actually a bit faster than fsync if you want a bit better speed. So, I'd recommend you upgrade to either bizgres or Postgres 8.1.1 to get the maximum COPY speed. > Here is the MySQL table. The main difference from the PostgreSQL > table is that the 'varchar(255)' columns are 'text' columns in PostgreSQL. Shouldn't matter. > mysql> DESCRIBE file_info_1; > +-----------------+--------------+------+-----+---------+-------+ > | Field | Type | Null | Key | Default | Extra | > +-----------------+--------------+------+-----+---------+-------+ > | file_group_name | varchar(255) | YES | | NULL | | > | file_group_uid | int(11) | | | 0 | | > | file_mod_time | bigint(20) | | | 0 | | > | file_name | varchar(255) | | | | | > | file_parent_dir | varchar(255) | | MUL | | | > | file_perm | int(11) | | | 0 | | > | file_size | bigint(20) | | | 0 | | > | file_type | char(1) | | | | | > | file_user_name | varchar(255) | YES | | NULL | | > | file_user_uid | int(11) | | | 0 | | > | file_backup | char(1) | | MUL | i | | > | file_display | char(1) | | | i | | > | file_restore | char(1) | | | i | | > +-----------------+--------------+------+-----+---------+-------+ What's a bigint(20)? Are you using "numeric" in Postgresql? > I will try turning off 'fsync' on my test box to see how much of a > performance gain I get and to see if it is close to what I am getting > out of MySQL. If that does turn out to be the case though I will be able > to comfortably continue recommending PostgreSQL from a stability point > of view. Again - fsync is a small part of the performance - you will need to run either Postgres 8.1.1 or Bizgres to get good COPY speed. - Luke