pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedlibpq vs ODBC
7+ messages / 4 participants
[nested] [flat]
* libpq vs ODBC
@ 2010-12-09 04:31 Divakar Singh <dpsmails@yahoo.com>
2010-12-09 05:01 ` Re: libpq vs ODBC Alex Goncharov <alex-goncharov@comcast.net>
0 siblings, 1 reply; 7+ messages in thread
From: Divakar Singh @ 2010-12-09 04:31 UTC (permalink / raw)
To: pgsql-performance
Is there any performance penalty when I use ODBC library vs using libpq?
Best Regards,
Divakar
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: libpq vs ODBC
2010-12-09 04:31 libpq vs ODBC Divakar Singh <dpsmails@yahoo.com>
@ 2010-12-09 05:01 ` Alex Goncharov <alex-goncharov@comcast.net>
2010-12-09 05:17 ` Re: libpq vs ODBC Divakar Singh <dpsmails@yahoo.com>
0 siblings, 1 reply; 7+ messages in thread
From: Alex Goncharov @ 2010-12-09 05:01 UTC (permalink / raw)
To: Divakar Singh <dpsmails@yahoo.com>; +Cc: pgsql-performance
,--- 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 --
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: libpq vs ODBC
2010-12-09 04:31 libpq vs ODBC Divakar Singh <dpsmails@yahoo.com>
2010-12-09 05:01 ` Re: libpq vs ODBC Alex Goncharov <alex-goncharov@comcast.net>
@ 2010-12-09 05:17 ` Divakar Singh <dpsmails@yahoo.com>
2010-12-09 05:51 ` Re: libpq vs ODBC Alex Goncharov <alex-goncharov@comcast.net>
0 siblings, 1 reply; 7+ messages in thread
From: Divakar Singh @ 2010-12-09 05:17 UTC (permalink / raw)
To: Alex Goncharov <alex-goncharov@comcast.net>; +Cc: pgsql-performance
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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: libpq vs ODBC
2010-12-09 04:31 libpq vs ODBC Divakar Singh <dpsmails@yahoo.com>
2010-12-09 05:01 ` Re: libpq vs ODBC Alex Goncharov <alex-goncharov@comcast.net>
2010-12-09 05:17 ` Re: libpq vs ODBC Divakar Singh <dpsmails@yahoo.com>
@ 2010-12-09 05:51 ` Alex Goncharov <alex-goncharov@comcast.net>
2010-12-09 06:39 ` Re: libpq vs ODBC Divakar Singh <dpsmails@yahoo.com>
2010-12-10 02:32 ` Re: libpq vs ODBC Pierre C <lists@peufeu.com>
0 siblings, 2 replies; 7+ messages in thread
From: Alex Goncharov @ 2010-12-09 05:51 UTC (permalink / raw)
To: Divakar Singh <dpsmails@yahoo.com>; +Cc: alex-goncharov@comcast.net; pgsql-performance
,--- 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 --
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: libpq vs ODBC
2010-12-09 04:31 libpq vs ODBC Divakar Singh <dpsmails@yahoo.com>
2010-12-09 05:01 ` Re: libpq vs ODBC Alex Goncharov <alex-goncharov@comcast.net>
2010-12-09 05:17 ` Re: libpq vs ODBC Divakar Singh <dpsmails@yahoo.com>
2010-12-09 05:51 ` Re: libpq vs ODBC Alex Goncharov <alex-goncharov@comcast.net>
@ 2010-12-09 06:39 ` Divakar Singh <dpsmails@yahoo.com>
2010-12-09 06:57 ` Re: libpq vs ODBC Pavel Stehule <pavel.stehule@gmail.com>
1 sibling, 1 reply; 7+ messages in thread
From: Divakar Singh @ 2010-12-09 06:39 UTC (permalink / raw)
To: Alex Goncharov <alex-goncharov@comcast.net>; +Cc: alex-goncharov@comcast.net; pgsql-performance
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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: libpq vs ODBC
2010-12-09 04:31 libpq vs ODBC Divakar Singh <dpsmails@yahoo.com>
2010-12-09 05:01 ` Re: libpq vs ODBC Alex Goncharov <alex-goncharov@comcast.net>
2010-12-09 05:17 ` Re: libpq vs ODBC Divakar Singh <dpsmails@yahoo.com>
2010-12-09 05:51 ` Re: libpq vs ODBC Alex Goncharov <alex-goncharov@comcast.net>
2010-12-09 06:39 ` Re: libpq vs ODBC Divakar Singh <dpsmails@yahoo.com>
@ 2010-12-09 06:57 ` Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 0 replies; 7+ messages in thread
From: Pavel Stehule @ 2010-12-09 06:57 UTC (permalink / raw)
To: Divakar Singh <dpsmails@yahoo.com>; +Cc: Alex Goncharov <alex-goncharov@comcast.net>; pgsql-performance
Hello
2010/12/9 Divakar Singh <dpsmails@yahoo.com>:
> 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 <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
>
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: libpq vs ODBC
2010-12-09 04:31 libpq vs ODBC Divakar Singh <dpsmails@yahoo.com>
2010-12-09 05:01 ` Re: libpq vs ODBC Alex Goncharov <alex-goncharov@comcast.net>
2010-12-09 05:17 ` Re: libpq vs ODBC Divakar Singh <dpsmails@yahoo.com>
2010-12-09 05:51 ` Re: libpq vs ODBC Alex Goncharov <alex-goncharov@comcast.net>
@ 2010-12-10 02:32 ` Pierre C <lists@peufeu.com>
1 sibling, 0 replies; 7+ messages in thread
From: Pierre C @ 2010-12-10 02:32 UTC (permalink / raw)
To: Divakar Singh <dpsmails@yahoo.com>; Alex Goncharov <alex-goncharov@comcast.net>; +Cc: pgsql-performance
On Thu, 09 Dec 2010 06:51:26 +0100, Alex Goncharov
<alex-goncharov@comcast.net> 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.
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2010-12-10 02:32 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-12-09 04:31 libpq vs ODBC Divakar Singh <dpsmails@yahoo.com>
2010-12-09 05:01 ` Alex Goncharov <alex-goncharov@comcast.net>
2010-12-09 05:17 ` Divakar Singh <dpsmails@yahoo.com>
2010-12-09 05:51 ` Alex Goncharov <alex-goncharov@comcast.net>
2010-12-09 06:39 ` Divakar Singh <dpsmails@yahoo.com>
2010-12-09 06:57 ` Pavel Stehule <pavel.stehule@gmail.com>
2010-12-10 02:32 ` Pierre C <lists@peufeu.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox