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 D747853CDE for ; Fri, 8 Apr 2005 19:12:59 +0100 (BST) 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 01628-01 for ; Fri, 8 Apr 2005 18:12:51 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by svr1.postgresql.org (Postfix) with ESMTP id E320653CAD for ; Fri, 8 Apr 2005 19:12:31 +0100 (BST) Received: by wproxy.gmail.com with SMTP id 58so1188768wri for ; Fri, 08 Apr 2005 11:12:32 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=mm6B3NyMkxik5M2uvPWb4N9aN1MT7WPqAqG2MEApX4rI7pJPMkAf73Y0J/o5CHunJBQP24Z118H+CWd1t6Oo9L0GErW/SXl6elQ3QkQdm/QEIYRGLgqLyTec9kprAxciZ2RkqNW6ha+wbBUypivdkLvNSJ45OQ8wOu+WxMQWyCs= Received: by 10.54.47.56 with SMTP id u56mr709687wru; Fri, 08 Apr 2005 11:12:31 -0700 (PDT) Received: by 10.54.45.39 with HTTP; Fri, 8 Apr 2005 11:12:31 -0700 (PDT) Message-ID: Date: Fri, 8 Apr 2005 14:12:31 -0400 From: Vlad Reply-To: Vlad To: Brandon Metcalf Subject: Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg Cc: dbdpg-general@gborg.postgresql.org, pgsql-interfaces@postgresql.org In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit References: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.248 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200504/30 X-Sequence-Number: 5446 Hi there, we've noticed that too here and quick explanation is - with the new "prepare" implementation, the query get prepared on the server side, which is good; the problem is that all of the bind values passed to the sql server during execute call are in form of ***varchar***, i.e. even if a field is of int type in postgresql table, DBD::Pg passes your bind value as char - as a result, postgresql doesn't use indexes. I don't know if developers of new DBD::Pg have some game plan to fix this problem... but it won't be easy: since perl is a no-var-type language, so either DBD::Pg needs to analyze the table columns data types first before executing a query and then use correct type for bind values, or let coder pass those types explicitly... though I'm not aware of a method in DBI that would let them do that... Anyone from DBD::Pg can comment this please? I was going to post an example to the list later today. On Apr 8, 2005 12:30 PM, Brandon Metcalf wrote: > Has anyone done any benchmarking between the old Pg interface and > DBI/DBD::Pg? I have two versions of some code one of which uses Pg > and the other DBI/DBD::Pg and the latter appears to cause much more of > load on the system where it's running than the former. However, I > haven't done any benchmarking to support this claim. > > -- > Brandon > _______________________________________________ > Dbdpg-general mailing list > Dbdpg-general@gborg.postgresql.org > http://gborg.postgresql.org/mailman/listinfo/dbdpg-general > -- Vlad