X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DCAE7D8D9F for ; Thu, 29 Sep 2005 00:47:05 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 49613-10 for ; Thu, 29 Sep 2005 03:47:02 +0000 (GMT) Received: from linuxworld.com.au (unknown [203.34.46.50]) by svr1.postgresql.org (Postfix) with ESMTP id 7CF08D9B46 for ; Thu, 29 Sep 2005 00:46:59 -0300 (ADT) Received: from linuxworld.com.au (IDENT:swm@localhost.localdomain [127.0.0.1]) by linuxworld.com.au (8.13.2/8.13.2) with ESMTP id j8T3ksMd024370; Thu, 29 Sep 2005 13:46:54 +1000 Received: from localhost (swm@localhost) by linuxworld.com.au (8.13.2/8.13.2/Submit) with ESMTP id j8T3ksr9024367; Thu, 29 Sep 2005 13:46:54 +1000 X-Authentication-Warning: linuxworld.com.au: swm owned process doing -bs Date: Thu, 29 Sep 2005 13:46:54 +1000 (EST) From: Gavin Sherry X-X-Sender: swm@linuxworld.com.au To: Joe Cc: pgsql-performance@postgresql.org Subject: Re: Comparative performance In-Reply-To: <433B4AA4.9080008@freedomcircle.net> Message-ID: References: <433B4AA4.9080008@freedomcircle.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.001 required=5 tests=[AWL=0.001] X-Spam-Level: X-Archive-Number: 200509/404 X-Sequence-Number: 14712 On Wed, 28 Sep 2005, Joe wrote: > I'm converting a relatively small database (2 MB) from MySQL to PostgreSQL. It > is used to generate web pages using PHP. Although the actual website runs under > Linux, the development is done under XP. I've completed most of the data > conversion and rewrite of the PHP scripts, so now I'm comparing relative > performance. > > It appears that PostgreSQL is two to three times slower than MySQL. For > example, some pages that have some 30,000 characters (when saved as HTML) take 1 > to 1 1/2 seconds with MySQL but 3 to 4 seconds with PostgreSQL. I had read that > the former was generally faster than the latter, particularly for simple web > applications but I was hoping that Postgres' performance would not be that > noticeably slower. Are you comparing PostgreSQL on XP to MySQL on XP or PostgreSQL on Linux to MySQL on Linux? Our performance on XP is not great. Also, which version of PostgreSQL are you using? > > I'm trying to determine if the difference can be attributed to anything that > I've done or missed. I've run VACUUM ANALYZE on the two main tables and I'm > looking at the results of EXPLAIN on the query that drives the retrieval of > probably 80% of the data for the pages in question. Good. > > Before I post the EXPLAIN and the table schema I'd appreciate confirmation that > this list is the appropriate forum. I'm a relative newcomer to PostgreSQL (but > not to relational databases), so I'm not sure if this belongs in the novice or > general lists. You can post the results of EXPLAIN ANALYZE here. Please including schema definitions and the query string(s) themselves. Thanks, Gavin