pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedRemote query very slow
2+ messages / 2 participants
[nested] [flat]
* Remote query very slow
@ 2004-09-30 09:50 Johann Robette <jrobette@onyme.com>
0 siblings, 1 reply; 2+ messages in thread
From: Johann Robette @ 2004-09-30 09:50 UTC (permalink / raw)
To: pgsql-jdbc
Hi,
I've installed postgres 7.3.5 on a fedora server. It works fine, at
least on a local basis. I perform an easy select * from a table and I
get the answer in approximatively 1s.
Now, I used the jdbc driver (jdbc3) for postgres. It connects fine but,
performing the same query, I get the answer in 7s.
What could be my problem?
Thanks in advance.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Remote query very slow
@ 2004-09-30 21:55 Oliver Jowett <oliver@opencloud.com>
parent: Johann Robette <jrobette@onyme.com>
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Jowett @ 2004-09-30 21:55 UTC (permalink / raw)
To: Johann Robette <jrobette@onyme.com>; +Cc: pgsql-jdbc
Johann Robette wrote:
> I’ve installed postgres 7.3.5 on a fedora server. It works fine, at
> least on a local basis. I perform an easy select * from a table and I
> get the answer in approximatively 1s.
>
> Now, I used the jdbc driver (jdbc3) for postgres. It connects fine but,
> performing the same query, I get the answer in 7s.
>
> What could be my problem?
Is it really a "remote query" problem? Or is it just a difference
between using psql and JDBC? How fast is the query if you run it
"remotely" via psql? (psql -h server database)
GC is the most likely culprit if you are running with default heap
settings and a large data set. Without instructions to the contrary
(e.g. Statement.setFetchSize) the driver will try to pull the entire
resultset into heap before returning from query execution. Try turning
on -verbose:gc on your JVM and see how much time is spent doing GC.
You probably want to upgrade both your server and JDBC driver (assuming
you're using the 7.3-era driver) if you can. The 7.3 server is getting
quite old now, and there are a lot of bugfixes in the current driver
that aren't in the 7.3 JDBC driver.
-O
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-09-30 21:55 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-09-30 09:50 Remote query very slow Johann Robette <jrobette@onyme.com>
2004-09-30 21:55 ` Oliver Jowett <oliver@opencloud.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