Re: performance hit with large tables...jdbc? - Mailing list pgsql-novice

From Tom Lane
Subject Re: performance hit with large tables...jdbc?
Date
Msg-id 28960.971753124@sss.pgh.pa.us
Whole thread Raw
In response to performance hit with large tables...jdbc?  (<mikeg@robot6.com>)
List pgsql-novice
<mikeg@robot6.com> writes:
> but now that we're going live with more data, we're suddenly
> noticing that a select on the primary key field is taking
> about 90 seconds.  However, if I go into the command line
> on the db server and do the exact same SQL select manually,
> it takes < 1 sec.  This makes me think it's some problem
> with my JDBC driver, or some hardware between the web-server
> and the db-server.

Hm.  Run the postmaster with -d2 so that queries are logged into
the postmaster log file, and see what query the client is really
sending.  I'll bet it's not what you think it is.

Another possibility is that there's some horrid inefficiency
in transmitting the query results, but unless this query is
returning a whole lot of data, that doesn't seem like it'd
explain 90 seconds.

            regards, tom lane

pgsql-novice by date:

Previous
From:
Date:
Subject: performance hit with large tables...jdbc?
Next
From: Stoffel van Aswegen
Date:
Subject: Comparison of Postgres vs MySQL