Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 9DA41632FB3 for ; Thu, 18 Mar 2010 11:51:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 60777-07 for ; Thu, 18 Mar 2010 14:50:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from anastacia.gransy.com (anastacia.gransy.com [77.78.104.100]) by mail.postgresql.org (Postfix) with ESMTP id 131316328D9 for ; Thu, 18 Mar 2010 11:50:57 -0300 (ADT) Received: from sq.gransy.com (localhost [127.0.0.1]) by anastacia.gransy.com (Postfix) with ESMTP id E6F3CAAC5AA; Thu, 18 Mar 2010 15:50:53 +0100 (CET) Received: from 193.179.187.70 (proxying for unknown) (SquirrelMail authenticated user tv@fuzzy.cz) by sq.gransy.com with HTTP; Thu, 18 Mar 2010 15:50:53 +0100 (CET) Message-ID: <57784.193.179.187.70.1268923853.squirrel@sq.gransy.com> In-Reply-To: <4BA23936.2030507@gmail.com> References: <4BA23936.2030507@gmail.com> Date: Thu, 18 Mar 2010 15:50:53 +0100 (CET) Subject: Re: mysql to postgresql, performance questions From: tv@fuzzy.cz To: "Corin" Cc: pgsql-performance@postgresql.org User-Agent: SquirrelMail/1.4.10a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-2 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.185 tagged_above=-10 required=5 tests=BAYES_40=-0.185 X-Spam-Level: X-Archive-Number: 201003/222 X-Sequence-Number: 38047 I guess we need some more details about the test. Is the connection/disconnection part of each test iteration? And how are the databases connected (using a socked / localhost / different host)? Anyway measuring such simple queries will tell you almost nothing about the general app performance - use the queries that are used in the application. > I also wonder why the reported runtime of 5.847 ms is so much different > to the runtime reported of my scripts (both php and ruby are almost the > same). What's the best tool to time queries in postgresql? Can this be > done from pgadmin? I doubt there's a 'best tool' to time queries, but I'd vote for logging from the application itself, as it measures the performance from the end user view-point (and that's what you're interested in). Just put some simple logging into the database access layer. regards Tomas