X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9E79A52894 for ; Tue, 14 Jun 2005 03:44:53 -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 73085-04 for ; Tue, 14 Jun 2005 06:44:45 +0000 (GMT) Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by svr1.postgresql.org (Postfix) with ESMTP id 8EB2252899 for ; Tue, 14 Jun 2005 03:44:45 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1Di59w-0005Fn-00; Tue, 14 Jun 2005 02:44:28 -0400 To: "Greg Sabino Mullane" Cc: pgsql-interfaces@postgresql.org Subject: Re: DBD::Pg performance bites compared to DBD::mysql? References: <933399e2f40b843429889b52d6ebae8d@biglumber.com> In-Reply-To: <933399e2f40b843429889b52d6ebae8d@biglumber.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 14 Jun 2005 02:44:28 -0400 Message-ID: <87u0k11lpv.fsf@stark.xeocode.com> Lines: 25 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 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.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/40 X-Sequence-Number: 5608 "Greg Sabino Mullane" writes: > I still maintain the original test is brain-dead, however. :) It was > testing for "insert speed" by basically doing this: > > for (1..1000) { > $dbh->do("INSERT INTO testtable(a,b) VALUES (1,2)"); > } > > It's as if the people who wrote it *cough*mysql*cough* never heard > of prepare/execute and did not read the DBI docs. Sure but wouldn't that show up as more time spent in the server in the parser and planner? I thought Tom was complaining that it was spending too much time in the client not waiting on server responses. I wonder if Postgres is being bitten by doing lots of extra round trips. Maybe the MySQL driver detects when there are no placeholders and no parameters and uses a different protocol method that only requires a single round trip? Or given your example maybe it even notices no result is needed and doesn't even wait for a response? -- greg