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 77BB0D9C75 for ; Thu, 29 Sep 2005 17:50:49 -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 57527-03 for ; Thu, 29 Sep 2005 20:50:46 +0000 (GMT) Received: from cluster1.echolabs.net (mail.atlanticbb.net [216.52.118.222]) by svr1.postgresql.org (Postfix) with ESMTP id F28A5D9C51 for ; Thu, 29 Sep 2005 17:50:47 -0300 (ADT) X-Scanned-By: RAE MPP/Clamd http://www.messagepartners.com X-Scanned-By: RAE MPP/Cloudmark http://www.messagepartners.com Received: from [209.187.134.170] (account jma@atlanticbb.net HELO [127.0.0.1]) by fe2.cluster1.echolabs.net (CommuniGate Pro SMTP 4.3.7) with ESMTPA id 82726440; Thu, 29 Sep 2005 16:50:49 -0400 Message-ID: <433C53AE.4090808@freedomcircle.net> Date: Thu, 29 Sep 2005 16:50:54 -0400 From: Joe Organization: Freedom Circle, LLC User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: PFC Cc: Gavin Sherry , Magnus Hagander , pgsql-performance@postgresql.org Subject: Re: Comparative performance References: <6BCB9D8A16AC4241919521715F4D8BCE92E6D6@algol.sollentuna.se> <433BDB0B.8010002@freedomcircle.net> <433BE1A0.5000807@freedomcircle.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.043 required=5 tests=[AWL=-0.007, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200509/433 X-Sequence-Number: 14741 PFC wrote: > Even though this query isn't that optimized, it's still only 16 > milliseconds. > Why does it take this long for PHP to get the results ? > > Can you try pg_query'ing this exact same query, FROM PHP, and timing > it with getmicrotime() ? Thanks, that's what I was looking for. It's microtime(), BTW. It'll take me some time to instrument it, but that way I can pinpoint what is really slow. > You can even do an EXPLAIN ANALYZE from pg_query and display the > results in your webpage, to check how long the query takes on the server. > > You can also try it on a Linux box. My current host only supports MySQL. I contacted hub.org to see if they could assist in this transition but I haven't heard back. > This smells like a TCP communication problem. I'm puzzled by that remark. How much does TCP get into the picture in a local Windows client/server environment? Joe