From dpsmails@yahoo.com Thu Dec 9 04:31:40 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 038001337B5A for ; Thu, 9 Dec 2010 00:31:40 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 25400-02 for ; Thu, 9 Dec 2010 04:31:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm2-vm0.bullet.mail.ac4.yahoo.com (nm2-vm0.bullet.mail.ac4.yahoo.com [98.139.52.66]) by mail.postgresql.org (Postfix) with SMTP id 862E8133655C for ; Thu, 9 Dec 2010 00:31:32 -0400 (AST) Received: from [98.139.52.191] by nm2.bullet.mail.ac4.yahoo.com with NNFMP; 09 Dec 2010 04:31:31 -0000 Received: from [98.139.52.140] by tm4.bullet.mail.ac4.yahoo.com with NNFMP; 09 Dec 2010 04:31:31 -0000 Received: from [127.0.0.1] by omp1023.mail.ac4.yahoo.com with NNFMP; 09 Dec 2010 04:31:31 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 16113.43338.bm@omp1023.mail.ac4.yahoo.com Received: (qmail 65438 invoked by uid 60001); 9 Dec 2010 04:31:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1291869090; bh=AHYbep/Ff5B7zOWevm+G2K0kpHK6vt57SJWX5nD3KBE=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=UUWH0SdTVvbENqnRsmsGQe5zZwxdlXnQUnNXZZiscTrVTrjEAskch9hblDFagP3Isbvxinezw8EN2fQsTP49fIOVH3I3T5DuhtPH5DrCsDenY9GRbuDiyHKVkVdmO5X4p9/eRJnrRiM5wFtM8zMgLu/Cz3Cma+seAQeuzewCNd0= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=q2h4ASd0B2BSrkXTDRQXaHwK5UkldgjTflVkedIA2OHlw/+SdiCSxdj0iZqob5IWqCBD+wGRUIMEjJRJ1mgfGWdIZMu5BLMxmOnAuZ1NeE2hTOEz0BLObWFvuteVYGDPGZGAkJdomn9N1IV1VXDgD9LjaU+wO+9xeo1HlkjnQrU=; Message-ID: <772237.64789.qm@web65408.mail.ac4.yahoo.com> X-YMail-OSG: VfP2qm8VM1mePweNZvwlw4aM.rq60FPtj_aiuhiBdcvbruR v_8Cdij40vdw_0Fx.YSIqeG4zlheA6MQhDgj7pDSreSLRyUNiyQgDz09.yCn mhH2JQd9Qe0Wz_Atm2xE6POtQoo3wHYOYRMeh7p0jygXDkYSJiQjGpi97fZS CmDSka22Pwezw24PhGlrCDGvd7Lha_eW8gG46r4RULexW.9VBjHCybUJTeXw 4g3.cTiEnu7VzY9vEfX2mJV1Bknw2CWykbEjUEfDzeWEo_WXWCuFZTrgSJXf .F6KLUzbALfeisxSw_fadMvaf32Yuw18jpB09Ht2hC8Lxm18YNTjz7wc- Received: from [194.237.142.20] by web65408.mail.ac4.yahoo.com via HTTP; Wed, 08 Dec 2010 20:31:30 PST X-Mailer: YahooMailRC/553 YahooMailWebService/0.8.107.285259 Date: Wed, 8 Dec 2010 20:31:30 -0800 (PST) From: Divakar Singh Subject: libpq vs ODBC To: pgsql-performance@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1596067600-1291869090=:64789" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.803 tagged_above=-10 required=5 tests=BAYES_50=0.8, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201012/135 X-Sequence-Number: 41587 --0-1596067600-1291869090=:64789 Content-Type: text/plain; charset=us-ascii Is there any performance penalty when I use ODBC library vs using libpq? Best Regards, Divakar --0-1596067600-1291869090=:64789 Content-Type: text/html; charset=us-ascii
Is there any performance penalty when I use ODBC library vs using libpq?
 
Best Regards,
Divakar


--0-1596067600-1291869090=:64789-- From alex-goncharov@comcast.net Thu Dec 9 05:01:26 2010 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A08DE133798E for ; Thu, 9 Dec 2010 01:01:26 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 82063-06 for ; Thu, 9 Dec 2010 05:01:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from qmta02.westchester.pa.mail.comcast.net (qmta02.westchester.pa.mail.comcast.net [76.96.62.24]) by mail.postgresql.org (Postfix) with ESMTP id 41D3A1336B42 for ; Thu, 9 Dec 2010 01:01:19 -0400 (AST) Received: from omta18.westchester.pa.mail.comcast.net ([76.96.62.90]) by qmta02.westchester.pa.mail.comcast.net with comcast id gozS1f0051wpRvQ52t1Kwk; Thu, 09 Dec 2010 05:01:19 +0000 Received: from hanssachs.home ([24.61.85.144]) by omta18.westchester.pa.mail.comcast.net with comcast id gt1K1f00236qgMk3et1KQV; Thu, 09 Dec 2010 05:01:19 +0000 Received: from algo by hanssachs.home with local (Exim 4.72 (FreeBSD)) (envelope-from ) id 1PQYd3-0000wW-PB; Thu, 09 Dec 2010 00:01:17 -0500 Date: Thu, 09 Dec 2010 00:01:17 -0500 Message-Id: From: Alex Goncharov To: Divakar Singh CC: pgsql-performance@postgresql.org In-reply-to: <772237.64789.qm@web65408.mail.ac4.yahoo.com> (message from Divakar Singh on Wed, 8 Dec 2010 20:31:30 -0800 (PST)) Subject: Re: libpq vs ODBC Reply-to: Alex Goncharov References: <772237.64789.qm@web65408.mail.ac4.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.908 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/136 X-Sequence-Number: 41588 ,--- You/Divakar (Wed, 8 Dec 2010 20:31:30 -0800 (PST)) ----* | Is there any performance penalty when I use ODBC library vs using libpq? In general, yes. In degenerate cases when most of the work happens in the server, no. You need to measure in the contents of your specific application. -- Alex -- alex-goncharov@comcast.net -- From dpsmails@yahoo.com Thu Dec 9 05:17:31 2010 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 8B4A61337B4A for ; Thu, 9 Dec 2010 01:17:31 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 01356-09 for ; Thu, 9 Dec 2010 05:17:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm16.bullet.mail.ac4.yahoo.com (nm16.bullet.mail.ac4.yahoo.com [98.139.52.213]) by mail.postgresql.org (Postfix) with SMTP id D9D501337B55 for ; Thu, 9 Dec 2010 01:17:22 -0400 (AST) Received: from [98.139.52.194] by nm16.bullet.mail.ac4.yahoo.com with NNFMP; 09 Dec 2010 05:17:22 -0000 Received: from [98.139.52.180] by tm7.bullet.mail.ac4.yahoo.com with NNFMP; 09 Dec 2010 05:17:22 -0000 Received: from [127.0.0.1] by omp1063.mail.ac4.yahoo.com with NNFMP; 09 Dec 2010 05:17:22 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 467630.59402.bm@omp1063.mail.ac4.yahoo.com Received: (qmail 24600 invoked by uid 60001); 9 Dec 2010 05:17:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1291871842; bh=uU+aBORhhk1xOru574H6J/cGil7YyJBRunsvxONC0gA=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=kyLxsMb3LoFpGsXoWC6cgWII87q2KwhBc1bJdjodFdGc/M2y3iHLJNpW5Nj97qtB0E8ovIICilV4GjbyXTj1n8jHOMbOt/Yg3Rc6arq7vLENLwqKkUQdl4nj4+t5InKSOWCxwWi5+AhcNylYxDDQEsmhFl9veywdp6q90wtjq8Q= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=jRZRozDVMXC6D2Wxg58C7v/7+nQcfSyvTwZQP7XRW6ifBKW4y6sFeYREdHM2K45ERRDnoAehK5xurKFxJcV2NgibjCfSUh7tlN8bBtCdOHEQK4dJuJ/Vd3E7/VgHrJglFYQDzc6ti9U+83auoY1GVTDEwpXASSjpG6Krid3WKGs=; Message-ID: <254429.23607.qm@web65410.mail.ac4.yahoo.com> X-YMail-OSG: ZWZk7WwVM1kSyC59eqc6x4bsObJchgoLgYVkUx0n1bzn5kz GXZqOqjRvIAjg5gwV3FyzCUbyU6p5bafVDYTBqPI4U4zhIovDeAOwvyl64qj naPs8pe.n21uoj_LpUHBYuV1hw5OwHhLAtV5s6tV2s3EPiJbvJfM1xKlAeZ. MAnmax_3opsEA391DNVP9opOi99m_FttdFr.Ffmvxwl9_hvdnKrIjKdlk27w DiO8V4bn20MauYg.bp_VHIhcp2z5yEkIFl50QjI4ROhz2Cg7Zuz9zPv6T4PN w4pNbS3NWsfiyHybDZA8pC7PzwwWpJlNmqUpUw4YMJ3kVtUDeHc2gYQv6Dr6 dq450vmPMHP.2glDDJg-- Received: from [194.237.142.20] by web65410.mail.ac4.yahoo.com via HTTP; Wed, 08 Dec 2010 21:17:22 PST X-Mailer: YahooMailRC/553 YahooMailWebService/0.8.107.285259 References: <772237.64789.qm@web65408.mail.ac4.yahoo.com> Date: Wed, 8 Dec 2010 21:17:22 -0800 (PST) From: Divakar Singh Subject: Re: libpq vs ODBC To: Alex Goncharov Cc: pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-167429766-1291871842=:23607" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.022 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1.929, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/137 X-Sequence-Number: 41589 --0-167429766-1291871842=:23607 Content-Type: text/plain; charset=us-ascii So it means there will be visible impact if the nature of DB interaction is DB insert/select. We do that mostly in my app. Performance difference would be negligible if the query is server intensive where execution time is far more than time taken by e.g. communication interface or transaction handling. Am I right? Best Regards, Divakar ________________________________ From: Alex Goncharov To: Divakar Singh Cc: pgsql-performance@postgresql.org Sent: Thu, December 9, 2010 10:31:17 AM Subject: Re: [PERFORM] libpq vs ODBC ,--- You/Divakar (Wed, 8 Dec 2010 20:31:30 -0800 (PST)) ----* | Is there any performance penalty when I use ODBC library vs using libpq? In general, yes. In degenerate cases when most of the work happens in the server, no. You need to measure in the contents of your specific application. -- Alex -- alex-goncharov@comcast.net -- -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance --0-167429766-1291871842=:23607 Content-Type: text/html; charset=us-ascii
So it means there will be visible impact if the nature of DB interaction is DB insert/select. We do that mostly in my app.
Performance difference would be negligible if the query is server intensive where execution time is far more than time taken by e.g. communication interface or transaction handling.
Am I right?
 
Best Regards,
Divakar



From: Alex Goncharov <alex-goncharov@comcast.net>
To: Divakar Singh <dpsmails@yahoo.com>
Cc: pgsql-performance@postgresql.org
Sent: Thu, December 9, 2010 10:31:17 AM
Subject: Re: [PERFORM] libpq vs ODBC

,--- You/Divakar (Wed, 8 Dec 2010 20:31:30 -0800 (PST)) ----*
| Is there any performance penalty when I use ODBC library vs using libpq?

In general, yes.

In degenerate cases when most of the work happens in the server, no.

You need to measure in the contents of your specific application.

-- Alex -- alex-goncharov@comcast.net --

--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

--0-167429766-1291871842=:23607-- From alex-goncharov@comcast.net Thu Dec 9 05:51:36 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 1194F1337B4A for ; Thu, 9 Dec 2010 01:51:36 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 47414-04 for ; Thu, 9 Dec 2010 05:51:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from qmta08.westchester.pa.mail.comcast.net (qmta08.westchester.pa.mail.comcast.net [76.96.62.80]) by mail.postgresql.org (Postfix) with ESMTP id 5780E133655C for ; Thu, 9 Dec 2010 01:51:28 -0400 (AST) Received: from omta13.westchester.pa.mail.comcast.net ([76.96.62.52]) by qmta08.westchester.pa.mail.comcast.net with comcast id gtl71f00217dt5G58trUjA; Thu, 09 Dec 2010 05:51:28 +0000 Received: from hanssachs.home ([24.61.85.144]) by omta13.westchester.pa.mail.comcast.net with comcast id gtrT1f00F36qgMk3ZtrUqk; Thu, 09 Dec 2010 05:51:28 +0000 Received: from algo by hanssachs.home with local (Exim 4.72 (FreeBSD)) (envelope-from ) id 1PQZPa-0000yV-Pd; Thu, 09 Dec 2010 00:51:26 -0500 Date: Thu, 09 Dec 2010 00:51:26 -0500 Message-Id: From: Alex Goncharov To: Divakar Singh CC: alex-goncharov@comcast.net, pgsql-performance@postgresql.org In-reply-to: <254429.23607.qm@web65410.mail.ac4.yahoo.com> (message from Divakar Singh on Wed, 8 Dec 2010 21:17:22 -0800 (PST)) Subject: Re: libpq vs ODBC Reply-to: Alex Goncharov References: <772237.64789.qm@web65408.mail.ac4.yahoo.com> <254429.23607.qm@web65410.mail.ac4.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.908 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/140 X-Sequence-Number: 41592 ,--- You/Divakar (Wed, 8 Dec 2010 21:17:22 -0800 (PST)) ----* | So it means there will be visible impact if the nature of DB interaction is DB | insert/select. We do that mostly in my app. You can't say a "visible impact" unless you can measure it in your specific application. Let's say ODBC takes 10 times of .001 sec for libpq. Is this a "visible impact"? | Performance difference would be negligible if the query is server intensive | where execution time is far more than time taken by e.g. communication interface | or transaction handling. | Am I right? You've got to measure -- there are too many variables to give you the answer you are trying to get. To a different question, "Would I use ODBC to work with PostgreSQL if I had the option of using libpq?", I'd certainly answer, "No". You'd need to have the option of using libpq, though. ODBC takes care of a lot of difficult details for you, and libpq's higher performance may turn out to be a loss for you, in your specific situation. -- Alex -- alex-goncharov@comcast.net -- From dpsmails@yahoo.com Thu Dec 9 06:39:46 2010 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 422AC133798E for ; Thu, 9 Dec 2010 02:39:46 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 52392-03 for ; Thu, 9 Dec 2010 06:39:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm5-vm0.bullet.mail.ac4.yahoo.com (nm5-vm0.bullet.mail.ac4.yahoo.com [98.139.52.68]) by mail.postgresql.org (Postfix) with SMTP id A3DDA1336B42 for ; Thu, 9 Dec 2010 02:39:38 -0400 (AST) Received: from [98.139.52.193] by nm5.bullet.mail.ac4.yahoo.com with NNFMP; 09 Dec 2010 06:39:37 -0000 Received: from [98.139.52.128] by tm6.bullet.mail.ac4.yahoo.com with NNFMP; 09 Dec 2010 06:39:37 -0000 Received: from [127.0.0.1] by omp1011.mail.ac4.yahoo.com with NNFMP; 09 Dec 2010 06:39:37 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 126457.34035.bm@omp1011.mail.ac4.yahoo.com Received: (qmail 71486 invoked by uid 60001); 9 Dec 2010 06:39:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1291876776; bh=7lZ17roz4P1sZBk0OK3AYAzw/kRuoni1Yo57dXTGMqQ=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=pPUOJCWLQuUoq2wQkrqkA3bYU7RGbLtsKjVIbyj41D7Rl9xpnbUIg2hNReLTEyqootYro7jdUISHXpSB5VE+RWdhDqAYWkuTdO5iEdvA2R8QgrwPDaCtJGd66Z+mgjhjhvbLCIgPt9J/MI+3gYAopj7hB0pE8C5EP1xxhT38p0I= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=qoV00xSgthIc5fQI/Zj0GLL4k3+kVSbswKgpmJH1WrFcCDHLh0Fa0KEGkUR97rHa/n8bt89Dc2s0oT/rp0O6ZuocxtgS5FR3P0KVGBdYA66Z4OlX7ka6usqs6x1TybCkZFE6Pf39H0fQ86hl54jQ7Ho4JhZRnbpiXkJgmaqZxW8=; Message-ID: <957894.71040.qm@web65406.mail.ac4.yahoo.com> X-YMail-OSG: cKEs5yAVM1m4rvU9jQYJmR0Qz2uL7Htq_wvXIXCxETslcXI _DDkRWaUCIQciidYD0jqHGJm161CaOtk0YCUge0dms92OsBELf9hhTsrm4AD AUlGNwTaixnGTdKb0R6.QbMqpjtvFSaJoZ2gD.w9Mf1iPaRuas_Siiy0kv8p ZZVHGihogbdKMkozXVjbwNZacQAHnfEnaaPr2oMdGG_hStLPV0Vncp_RJuWF Gx_IM._SuSC26Fa3Ts_eFqnB6RvI_AL8UKfheczsQK4hI0BrN78ApH7Qz7uX .nkZuxEb9qnrSj5b96uKjM8MAz9FJCn6OUopYEXv_tFpV.ev2gqzy0kUouai ATptL5YWpqx32Gf9yRR8rDpSmEOQTwcXlpLBGJxV1VCSQIQ-- Received: from [194.237.142.20] by web65406.mail.ac4.yahoo.com via HTTP; Wed, 08 Dec 2010 22:39:36 PST X-Mailer: YahooMailRC/553 YahooMailWebService/0.8.107.285259 References: <772237.64789.qm@web65408.mail.ac4.yahoo.com> <254429.23607.qm@web65410.mail.ac4.yahoo.com> Date: Wed, 8 Dec 2010 22:39:36 -0800 (PST) From: Divakar Singh Subject: Re: libpq vs ODBC To: Alex Goncharov Cc: alex-goncharov@comcast.net, pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1500843935-1291876776=:71040" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.022 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1.929, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/141 X-Sequence-Number: 41593 --0-1500843935-1291876776=:71040 Content-Type: text/plain; charset=us-ascii hmm If I understand it correctly you argument is valid from performance point of view. But in practical scenarios, it would make more sense to do ODBC if the difference is only 5% or so, because it opens up so many choices of databases for me. Do we have some published data in this area. Best Regards, Divakar ________________________________ From: Alex Goncharov To: Divakar Singh Cc: alex-goncharov@comcast.net; pgsql-performance@postgresql.org Sent: Thu, December 9, 2010 11:21:26 AM Subject: Re: [PERFORM] libpq vs ODBC ,--- You/Divakar (Wed, 8 Dec 2010 21:17:22 -0800 (PST)) ----* | So it means there will be visible impact if the nature of DB interaction is DB | insert/select. We do that mostly in my app. You can't say a "visible impact" unless you can measure it in your specific application. Let's say ODBC takes 10 times of .001 sec for libpq. Is this a "visible impact"? | Performance difference would be negligible if the query is server intensive | where execution time is far more than time taken by e.g. communication interface | or transaction handling. | Am I right? You've got to measure -- there are too many variables to give you the answer you are trying to get. To a different question, "Would I use ODBC to work with PostgreSQL if I had the option of using libpq?", I'd certainly answer, "No". You'd need to have the option of using libpq, though. ODBC takes care of a lot of difficult details for you, and libpq's higher performance may turn out to be a loss for you, in your specific situation. -- Alex -- alex-goncharov@comcast.net -- -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance --0-1500843935-1291876776=:71040 Content-Type: text/html; charset=us-ascii
hmm
If I understand it correctly you argument is valid from performance point of view.
But in practical scenarios, it would make more sense to do ODBC if the difference is only 5% or so, because it opens up so many choices of databases for me.
Do we have some published data in this area.

 
Best Regards,
Divakar



From: Alex Goncharov <alex-goncharov@comcast.net>
To: Divakar Singh <dpsmails@yahoo.com>
Cc: alex-goncharov@comcast.net; pgsql-performance@postgresql.org
Sent: Thu, December 9, 2010 11:21:26 AM
Subject: Re: [PERFORM] libpq vs ODBC

,--- You/Divakar (Wed, 8 Dec 2010 21:17:22 -0800 (PST)) ----*
| So it means there will be visible impact if the nature of DB interaction is DB
| insert/select. We do that mostly in my app.

You can't say a "visible impact" unless you can measure it in your
specific application.

Let's say ODBC takes 10 times of .001 sec for libpq.  Is this a
"visible impact"?

| Performance difference would be negligible if the query is server intensive
| where execution time is far more than time taken by e.g. communication interface
| or transaction handling.
| Am I right?

You've got to measure -- there are too many variables to give you the
answer you are trying to get.

To a different question, "Would I use ODBC to work with PostgreSQL if
I had the option of using libpq?", I'd certainly answer, "No".

You'd need to have the option of using libpq, though.  ODBC takes care
of a lot of difficult details for you, and libpq's higher performance
may turn out to be a loss for you, in your specific situation.

-- Alex -- alex-goncharov@comcast.net --


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

--0-1500843935-1291876776=:71040-- From pavel.stehule@gmail.com Thu Dec 9 06:57:54 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 24D0C133798E for ; Thu, 9 Dec 2010 02:57:54 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 66209-03 for ; Thu, 9 Dec 2010 06:57:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f174.google.com (mail-iw0-f174.google.com [209.85.214.174]) by mail.postgresql.org (Postfix) with ESMTP id 6C8801336B42 for ; Thu, 9 Dec 2010 02:57:45 -0400 (AST) Received: by iwn9 with SMTP id 9so3188021iwn.19 for ; Wed, 08 Dec 2010 22:57:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=/XDRlu+4PZNVeLgnloDVjQelQRFGDbIRkjPdqXA2dp0=; b=ZFo2qAK+NYdBsmRHBBITKbui7FiiZEiDZzcmDmNSroDEEEZnmXPBaT6Yjfz2HwGcf8 9G3I0sSUNcYFpdbXQ7jgEXQWJuUK3zOfg1hVxHNYgF4G8vr098x6U0Yki/D7jW3NQ0Sk ai0z9ihotNiYGp591XSzp2fu9LSZKUSv56BTI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=WXqKznWLP9mQz8lalT02cafspF9A6p7oDqNsPJm1azvhLvPpCXVTZY8HmstmRuQ6KO 9wOm6DaWOroSmJfrCTQ+2eK4ghLYurg8mTtwN5JBDDK6yjIvVQo8oV41xS8HmYuXUF61 ZCzMBxr73LMMnl8EqD94lswRq0k+03PC928dk= Received: by 10.42.164.194 with SMTP id h2mr643619icy.516.1291877864675; Wed, 08 Dec 2010 22:57:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.165.10 with HTTP; Wed, 8 Dec 2010 22:57:04 -0800 (PST) In-Reply-To: <957894.71040.qm@web65406.mail.ac4.yahoo.com> References: <772237.64789.qm@web65408.mail.ac4.yahoo.com> <254429.23607.qm@web65410.mail.ac4.yahoo.com> <957894.71040.qm@web65406.mail.ac4.yahoo.com> From: Pavel Stehule Date: Thu, 9 Dec 2010 07:57:04 +0100 Message-ID: Subject: Re: libpq vs ODBC To: Divakar Singh Cc: Alex Goncharov , pgsql-performance@postgresql.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.67 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1.929, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201012/142 X-Sequence-Number: 41594 Hello 2010/12/9 Divakar Singh : > hmm > If I understand it correctly you argument is valid from performance point= of > view. > But in practical scenarios, it would make more sense to do ODBC if the > difference is only 5% or so, because it opens up so many choices of > databases for me. > Do we have some published data in this area. > It's depend on your environment - VB or VBA has not native drivers, so you have to use a ODBC. The overhead from ODBC or ADO or ADO.NET for almost task unsignificant. So people use it. The performance problems can be detected in some special tasks - and then is necessary to use a stored procedures. Regards Pavel Stehule > > Best Regards, > Divakar > > ________________________________ > From: Alex Goncharov > To: Divakar Singh > Cc: alex-goncharov@comcast.net; pgsql-performance@postgresql.org > Sent: Thu, December 9, 2010 11:21:26 AM > Subject: Re: [PERFORM] libpq vs ODBC > > ,--- You/Divakar (Wed, 8 Dec 2010 21:17:22 -0800 (PST)) ----* > | So it means there will be visible impact if the nature of DB interactio= n > is DB > | insert/select. We do that mostly in my app. > > You can't say a "visible impact" unless you can measure it in your > specific application. > > Let's say ODBC takes 10 times of .001 sec for libpq.=C2=A0 Is this a > "visible impact"? > > | Performance difference would be negligible if the query is server > intensive > | where execution time is far more than time taken by e.g. communication > interface > | or transaction handling. > | Am I right? > > You've got to measure -- there are too many variables to give you the > answer you are trying to get. > > To a different question, "Would I use ODBC to work with PostgreSQL if > I had the option of using libpq?", I'd certainly answer, "No". > > You'd need to have the option of using libpq, though.=C2=A0 ODBC takes ca= re > of a lot of difficult details for you, and libpq's higher performance > may turn out to be a loss for you, in your specific situation. > > -- Alex -- alex-goncharov@comcast.net -- > > > -- > Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org= ) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance > > From lists@peufeu.com Fri Dec 10 02:32:37 2010 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A521E1337B7F for ; Thu, 9 Dec 2010 22:32:37 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 95070-08 for ; Fri, 10 Dec 2010 02:32:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from 63.mail-out.ovh.net (63.mail-out.ovh.net [91.121.185.56]) by mail.postgresql.org (Postfix) with SMTP id 0CE011337B49 for ; Thu, 9 Dec 2010 22:32:29 -0400 (AST) Received: (qmail 25020 invoked by uid 503); 10 Dec 2010 03:06:37 -0000 Received: from b9.ovh.net (HELO mail188.ha.ovh.net) (213.186.33.59) by 63.mail-out.ovh.net with SMTP; 10 Dec 2010 03:06:37 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 10 Dec 2010 04:32:26 +0200 Received: from par69-8-88-161-102-87.fbx.proxad.net (HELO apollo13) (lists%peufeu.com@88.161.102.87) by ns0.ovh.net with SMTP; 10 Dec 2010 04:32:25 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Cc: pgsql-performance@postgresql.org References: <772237.64789.qm@web65408.mail.ac4.yahoo.com> <254429.23607.qm@web65410.mail.ac4.yahoo.com> Subject: Re: libpq vs ODBC To: "Divakar Singh" , "Alex Goncharov" Date: Fri, 10 Dec 2010 03:32:24 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Pierre C" Message-ID: In-Reply-To: User-Agent: Opera Mail/10.62 (Linux) X-Ovh-Tracer-Id: 10464395210568631819 X-Ovh-Remote: 88.161.102.87 (par69-8-88-161-102-87.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|U 0.5/N X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201012/145 X-Sequence-Number: 41597 On Thu, 09 Dec 2010 06:51:26 +0100, Alex Goncharov wrote: > ,--- You/Divakar (Wed, 8 Dec 2010 21:17:22 -0800 (PST)) ----* > | So it means there will be visible impact if the nature of DB > interaction is DB > | insert/select. We do that mostly in my app. > > You can't say a "visible impact" unless you can measure it in your > specific application. > > Let's say ODBC takes 10 times of .001 sec for libpq. Is this a > "visible impact"? Well you have to consider server and client resources separately. If you waste a bit of CPU time on the client by using a suboptimal driver, that may be a problem, or not. It you waste server resources, that is much more likely to be a problem, because it is multiplied by the number of clients. I don't know about the specifics of ODBC performance, but for instance php's PDO driver's handling of prepared statements with postgres comes up as an example of what not to do.