pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedJDBC speed question.
7+ messages / 4 participants
[nested] [flat]
* JDBC speed question.
@ 2001-04-24 17:21 John Oakes <john@networkproductions.net>
2001-04-26 22:35 ` Re: JDBC speed question. Doug McNaught <doug@wireboard.com>
0 siblings, 1 reply; 7+ messages in thread
From: John Oakes @ 2001-04-24 17:21 UTC (permalink / raw)
To: pgsql-general@postgresql.org
Anyone have any ideas how to speed up performance using the JDBC driver? A
query that takes me 20 seconds to execute from command line takes 1 full
minute with the jdbc driver. Thanks.
John
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: JDBC speed question.
2001-04-24 17:21 JDBC speed question. John Oakes <john@networkproductions.net>
@ 2001-04-26 22:35 ` Doug McNaught <doug@wireboard.com>
2001-04-26 23:16 ` Re: JDBC speed question. Clayton Vernon <cvernon@enron.com>
0 siblings, 1 reply; 7+ messages in thread
From: Doug McNaught @ 2001-04-26 22:35 UTC (permalink / raw)
To: John Oakes <john@networkproductions.net>; +Cc: pgsql-general@postgresql.org
"John Oakes" <john@networkproductions.net> writes:
> Anyone have any ideas how to speed up performance using the JDBC driver? A
> query that takes me 20 seconds to execute from command line takes 1 full
> minute with the jdbc driver. Thanks.
Since you don't guve any details of your query or network setup, it's
hard to help much. What could account for the difference, assuming
that the query is exactly the same in both cases, is that the JDBC
driver connects through TCP/IP (even when on the same host) whereas
'psql' will by default connect through a Unix socket. On most
systems, Unix sockets are considerably faster than even local TCP
sockets. If the JDBC client is running on a different machine, the
difference becomes even more pronounced.
This is assuming that your query is returning a great deal of data, so
the network pipe is a factor in the execution time. If it isn't, then
it's unclear how to help you without more details on your table
layouts and the query itself.
-Doug
--
The rain man gave me two cures; he said jump right in,
The first was Texas medicine--the second was just railroad gin,
And like a fool I mixed them, and it strangled up my mind,
Now people just get uglier, and I got no sense of time... --Dylan
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: JDBC speed question.
2001-04-24 17:21 JDBC speed question. John Oakes <john@networkproductions.net>
2001-04-26 22:35 ` Re: JDBC speed question. Doug McNaught <doug@wireboard.com>
@ 2001-04-26 23:16 ` Clayton Vernon <cvernon@enron.com>
2001-04-26 23:19 ` Re: JDBC speed question. Doug McNaught <doug@wireboard.com>
0 siblings, 1 reply; 7+ messages in thread
From: Clayton Vernon @ 2001-04-26 23:16 UTC (permalink / raw)
To: John Oakes <john@networkproductions.net>; Doug McNaught <doug@wireboard.com>; +Cc: pgsql-general@postgresql.org
Related question: how do you run postgreSQL to simultaneously support a Unix
socket and TCP/IP?
----- Original Message -----
From: "Doug McNaught" <doug@wireboard.com>
To: "John Oakes" <john@networkproductions.net>
Cc: <pgsql-general@postgresql.org>
Sent: Thursday, April 26, 2001 5:35 PM
Subject: Re: [GENERAL] JDBC speed question.
> "John Oakes" <john@networkproductions.net> writes:
>
> > Anyone have any ideas how to speed up performance using the JDBC driver?
A
> > query that takes me 20 seconds to execute from command line takes 1 full
> > minute with the jdbc driver. Thanks.
>
> Since you don't guve any details of your query or network setup, it's
> hard to help much. What could account for the difference, assuming
> that the query is exactly the same in both cases, is that the JDBC
> driver connects through TCP/IP (even when on the same host) whereas
> 'psql' will by default connect through a Unix socket. On most
> systems, Unix sockets are considerably faster than even local TCP
> sockets. If the JDBC client is running on a different machine, the
> difference becomes even more pronounced.
>
> This is assuming that your query is returning a great deal of data, so
> the network pipe is a factor in the execution time. If it isn't, then
> it's unclear how to help you without more details on your table
> layouts and the query itself.
>
> -Doug
> --
> The rain man gave me two cures; he said jump right in,
> The first was Texas medicine--the second was just railroad gin,
> And like a fool I mixed them, and it strangled up my mind,
> Now people just get uglier, and I got no sense of time... --Dylan
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: JDBC speed question.
2001-04-24 17:21 JDBC speed question. John Oakes <john@networkproductions.net>
2001-04-26 22:35 ` Re: JDBC speed question. Doug McNaught <doug@wireboard.com>
2001-04-26 23:16 ` Re: JDBC speed question. Clayton Vernon <cvernon@enron.com>
@ 2001-04-26 23:19 ` Doug McNaught <doug@wireboard.com>
2001-04-26 23:38 ` Re: JDBC speed question. Clayton Vernon <cvernon@enron.com>
0 siblings, 1 reply; 7+ messages in thread
From: Doug McNaught @ 2001-04-26 23:19 UTC (permalink / raw)
To: Clayton Vernon <cvernon@enron.com>; +Cc: John Oakes <john@networkproductions.net>; pgsql-general@postgresql.org
"Clayton Vernon" <cvernon@enron.com> writes:
> Related question: how do you run postgreSQL to simultaneously support a Unix
> socket and TCP/IP?
Just add '-i' to the postmaster startup options. The Unix socket will
still be available.
-Doug
--
The rain man gave me two cures; he said jump right in,
The first was Texas medicine--the second was just railroad gin,
And like a fool I mixed them, and it strangled up my mind,
Now people just get uglier, and I got no sense of time... --Dylan
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: JDBC speed question.
2001-04-24 17:21 JDBC speed question. John Oakes <john@networkproductions.net>
2001-04-26 22:35 ` Re: JDBC speed question. Doug McNaught <doug@wireboard.com>
2001-04-26 23:16 ` Re: JDBC speed question. Clayton Vernon <cvernon@enron.com>
2001-04-26 23:19 ` Re: JDBC speed question. Doug McNaught <doug@wireboard.com>
@ 2001-04-26 23:38 ` Clayton Vernon <cvernon@enron.com>
2001-04-26 23:54 ` Re: JDBC speed question. Doug McNaught <doug@wireboard.com>
2001-04-29 05:20 ` Re: JDBC speed question. Justin Clift <justin@postgresql.org>
0 siblings, 2 replies; 7+ messages in thread
From: Clayton Vernon @ 2001-04-26 23:38 UTC (permalink / raw)
To: Doug McNaught <doug@wireboard.com>; +Cc: John Oakes <john@networkproductions.net>; pgsql-general@postgresql.org
Thanks, but can I specify each port? I've only seen the one documented
command option "-p" which I assume was for the TCP/IP port.
Again, thanks for the help,
Clayton
----- Original Message -----
From: "Doug McNaught" <doug@wireboard.com>
To: "Clayton Vernon" <cvernon@enron.com>
Cc: "John Oakes" <john@networkproductions.net>;
<pgsql-general@postgresql.org>
Sent: Thursday, April 26, 2001 6:19 PM
Subject: Re: [GENERAL] JDBC speed question.
> "Clayton Vernon" <cvernon@enron.com> writes:
>
> > Related question: how do you run postgreSQL to simultaneously support a
Unix
> > socket and TCP/IP?
>
> Just add '-i' to the postmaster startup options. The Unix socket will
> still be available.
>
> -Doug
> --
> The rain man gave me two cures; he said jump right in,
> The first was Texas medicine--the second was just railroad gin,
> And like a fool I mixed them, and it strangled up my mind,
> Now people just get uglier, and I got no sense of time... --Dylan
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: JDBC speed question.
2001-04-24 17:21 JDBC speed question. John Oakes <john@networkproductions.net>
2001-04-26 22:35 ` Re: JDBC speed question. Doug McNaught <doug@wireboard.com>
2001-04-26 23:16 ` Re: JDBC speed question. Clayton Vernon <cvernon@enron.com>
2001-04-26 23:19 ` Re: JDBC speed question. Doug McNaught <doug@wireboard.com>
2001-04-26 23:38 ` Re: JDBC speed question. Clayton Vernon <cvernon@enron.com>
@ 2001-04-26 23:54 ` Doug McNaught <doug@wireboard.com>
1 sibling, 0 replies; 7+ messages in thread
From: Doug McNaught @ 2001-04-26 23:54 UTC (permalink / raw)
To: Clayton Vernon <cvernon@enron.com>; +Cc: John Oakes <john@networkproductions.net>; pgsql-general@postgresql.org
"Clayton Vernon" <cvernon@enron.com> writes:
> Thanks, but can I specify each port? I've only seen the one documented
> command option "-p" which I assume was for the TCP/IP port.
Well, Unix sockets don't have a "port". The port number you specify
is appended to the name of the socket in the filesystem (eg
'/tmp/.s.PGSQL.5432') so postmasters running on different ports won't
try to create the same socket.
What exactly are you trying to do?
-Doug
--
The rain man gave me two cures; he said jump right in,
The first was Texas medicine--the second was just railroad gin,
And like a fool I mixed them, and it strangled up my mind,
Now people just get uglier, and I got no sense of time... --Dylan
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: JDBC speed question.
2001-04-24 17:21 JDBC speed question. John Oakes <john@networkproductions.net>
2001-04-26 22:35 ` Re: JDBC speed question. Doug McNaught <doug@wireboard.com>
2001-04-26 23:16 ` Re: JDBC speed question. Clayton Vernon <cvernon@enron.com>
2001-04-26 23:19 ` Re: JDBC speed question. Doug McNaught <doug@wireboard.com>
2001-04-26 23:38 ` Re: JDBC speed question. Clayton Vernon <cvernon@enron.com>
@ 2001-04-29 05:20 ` Justin Clift <justin@postgresql.org>
1 sibling, 0 replies; 7+ messages in thread
From: Justin Clift @ 2001-04-29 05:20 UTC (permalink / raw)
To: Clayton Vernon <cvernon@enron.com>; pgsql-general@postgresql.org
Hi Clayton,
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2001-04-29 05:20 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-04-24 17:21 JDBC speed question. John Oakes <john@networkproductions.net>
2001-04-26 22:35 ` Doug McNaught <doug@wireboard.com>
2001-04-26 23:16 ` Clayton Vernon <cvernon@enron.com>
2001-04-26 23:19 ` Doug McNaught <doug@wireboard.com>
2001-04-26 23:38 ` Clayton Vernon <cvernon@enron.com>
2001-04-26 23:54 ` Doug McNaught <doug@wireboard.com>
2001-04-29 05:20 ` Justin Clift <justin@postgresql.org>
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