Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A2A5E64FD13 for ; Mon, 21 Jul 2008 08:19:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 59824-10 for ; Mon, 21 Jul 2008 08:19:21 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from web25802.mail.ukl.yahoo.com (web25802.mail.ukl.yahoo.com [217.12.10.187]) by postgresql.org (Postfix) with SMTP id A71D264FCDC for ; Mon, 21 Jul 2008 08:19:17 -0300 (ADT) Received: (qmail 61431 invoked by uid 60001); 21 Jul 2008 11:19:15 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=2ca2isfBtHmJciMjTVNy1UBaUmGGGA4A4sejKDe6Rg6zTx04Gpqa+Sl3nEIiF8rBMBzrUkdj//4c8vBAF/RhaaXxhbmIU3qk/9OhyTicSeny9qsfrItXM5OI4993QIgSnM8OfySuEo9NpyFfDx0NNVo5tF+SPPDzcJazSJ24Bjk=; Received: from [62.254.183.162] by web25802.mail.ukl.yahoo.com via HTTP; Mon, 21 Jul 2008 11:19:15 GMT X-Mailer: YahooMailWebService/0.7.218 Date: Mon, 21 Jul 2008 11:19:15 +0000 (GMT) From: Valentin Bogdanov Reply-To: valiouk@yahoo.co.uk Subject: Perl/DBI vs Native To: psql performance MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <768129.60859.qm@web25802.mail.ukl.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.315 tagged_above=0 required=5 tests=SARE_MILLIONSOF=0.315 X-Spam-Level: X-Archive-Number: 200807/174 X-Sequence-Number: 30774 Hi, I have ran quite a few tests comparing how long a query takes to execute fr= om Perl/DBI as compared to psql/pqlib. No matter how many times I run the t= est the results were always the same. I run a SELECT all on a fairly big table and enabled the log_min_duration_s= tatement option. With psql postgres consistently logs half a second while t= he exact same query executed with Perl/DBI takes again consistently 2 secon= ds. If I were timing the applications I would have been too much surprised by t= hese results, obviously, processing with Perl would be slower than a native= application. But it's the postmaster that gives these results. Could it be= because the DBI module is slower at assimilating the data? Any light on the subject would be greatly appreciated. Regards, Val=0A=0A=0A _________________________________________________________= _=0ANot happy with your email address?.=0AGet the one you really want - mil= lions of new email addresses available now at Yahoo! http://uk.docs.yahoo.c= om/ymail/new.html