Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 6A0F7632FB3 for ; Thu, 18 Mar 2010 14:08:47 -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 82396-10 for ; Thu, 18 Mar 2010 17:08:34 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from adonis.tweakers.net (adonis.tweakers.net [213.239.154.11]) by mail.postgresql.org (Postfix) with ESMTP id 9A75B632277 for ; Thu, 18 Mar 2010 14:08:36 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by adonis.tweakers.net (Postfix) with ESMTP id D5B755DC0BD for ; Thu, 18 Mar 2010 18:08:34 +0100 (CET) Received: from adonis.tweakers.net ([127.0.0.1]) by localhost (adonis.tweakers.net [127.0.0.1]) (amavisd-maia, port 10024) with ESMTP id 09702-09 for ; Thu, 18 Mar 2010 18:08:34 +0100 (CET) Received: from [192.168.1.33] (82-169-23-111.ip.telfort.nl [82.169.23.111]) by adonis.tweakers.net (Postfix) with ESMTPSA id A474A5DC098 for ; Thu, 18 Mar 2010 18:08:34 +0100 (CET) Message-ID: <4BA25E12.20906@tweakers.net> Date: Thu, 18 Mar 2010 18:08:34 +0100 From: Arjen van der Meijden User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: mysql to postgresql, performance questions References: <4BA23936.2030507@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/230 X-Sequence-Number: 38055 On 18-3-2010 16:50 Scott Marlowe wrote: > It's different because it only takes pgsql 5 milliseconds to run the > query, and 40 seconds to transfer the data across to your applicaiton, > which THEN promptly throws it away. If you run it as > > MySQL's client lib doesn't transfer over the whole thing. This is > more about how each db interface is implemented in those languages. Its the default behavior of both PostgreSQL and MySQL to transfer the whole resultset over to the client. Or is that different for Ruby's MySQL-driver? At least in PHP the behavior is similar for both. And I certainly do hope its 40ms rather than 40s, otherwise it would be a really bad performing network in either case (15s for mysql) or very large records (which I doubt). I'm wondering if a new connection is made between each query. PostgreSQL is (afaik still is but I haven't compared that recently) a bit slower on that department than MySQL. Best regards, Arjen