X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DBB623A5D31 for ; Wed, 26 Jan 2005 20:00:51 +0000 (GMT) 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 51607-06 for ; Wed, 26 Jan 2005 20:00:42 +0000 (GMT) Received: from boutiquenumerique.com (boutiquenumerique.com [82.67.9.10]) by svr1.postgresql.org (Postfix) with ESMTP id D59913A5CC8 for ; Wed, 26 Jan 2005 20:00:41 +0000 (GMT) Received: (qmail 13519 invoked from network); 26 Jan 2005 21:00:56 +0100 Received: from unknown (HELO musicbox) (boutiquenumerique-lists@192.168.0.2) by boutiquenumerique.com with SMTP; 26 Jan 2005 21:00:56 +0100 Date: Wed, 26 Jan 2005 21:02:42 +0100 To: SpaceBallOne , pgsql-performance@postgresql.org Subject: Re: poor performance of db? References: From: PFC Organization: =?iso-8859-15?Q?La_Boutique_Num=E9rique?= Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: User-Agent: Opera M2/7.54 (Linux, build 751) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/513 X-Sequence-Number: 10203 > Every time I tested an idea to speed it up, I got exactly the same > loading time on a Athlon 1800+, 256Mb RAM, 20Gb PATA computer as > compared to a Dual Opteron 246, 1Gb RAM, 70Gb WD Raptor SATA server. > Now, why a dual opteron machine can't perform any faster than a lowly > 1800+ athlon in numerous tests is completely beyond me ... increased > memory and RAID 0 disc configurations so far have not resulted in any > significant performance gain in the opteron server. How many rows does the query return ? Maybe a lot of time is spent, hidden in the PHP libraries, converting the rows returned by psql into PHP objects. You should try that : EXPLAIN ANALYZE SELECT your query -> time is T1 CREATE TABLE cache AS SELECT your query EXPLAIN ANALYZE SELECT * FROM cache -> time is T2 (probably very small) Now in your PHP script replace SELECT your query by SELECT * FROM cache. How much does the final page time changes ? This will tell you the time spend in the postgres engine, not in data transmission and PHPing. It will tell wat you can gain optimizing the query.