pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed"Select * " on 12-18M row table from remote machine thru JDBC - Performance nose-dives after 10M-ish records
2+ messages / 2 participants
[nested] [flat]
* "Select * " on 12-18M row table from remote machine thru JDBC - Performance nose-dives after 10M-ish records
@ 2012-09-28 13:52 antthelimey <antthelimey@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: antthelimey @ 2012-09-28 13:52 UTC (permalink / raw)
To: pgsql-performance
On machine 1 - a table that contains between 12 and 18 million rows
On machine 2 - a Java app that calls Select * on the table, and writes it
into a Lucene index
Originally had a fetchSize of 10,000 and would take around 38 minutes for 12
million, 50 minutes for 16ish million to read it all & write it all back out
as the lucene index
One day it started taking 4 hours. If something changed, we dont know what
it was
We tracked it down to, after 10 million or so rows, the Fetch to get the
next 10,000 rows from the DB goes from like 1 second to 30 seconds, and
stays there
After spending a week of two devs & DBA trying to solve this, we eventually
"solved" it by upping the FetchRowSize in the JDBC call to 50,000
It was performing well enough again for a few weeks
then...one day... it started taking 4 hours again
we tried upping the shared_buffer from 16GB to 20GB
And last night... it took 7 hours
we are using PGSQL 9.1
does anyone have ANY ideas?!
thanks much
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Select-on-12-18M-row-table-from-remote-machine-thru-JDBC-Per...
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: "Select * " on 12-18M row table from remote machine thru JDBC - Performance nose-dives after 10M-ish records
@ 2012-09-28 15:10 Deron <fecastle@gmail.com>
parent: antthelimey <antthelimey@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Deron @ 2012-09-28 15:10 UTC (permalink / raw)
To: antthelimey <antthelimey@gmail.com>; +Cc: pgsql-performance
I think the best advice I can think of is to go back to the basics. Tools
like sar and top and look at logs. Changing random settings on both the
client and server seems like guessing. I find it unlikely that the changes
you made (jdbc and shared buffers) had the effects you noticed. Determine
if it is I/O, CPU, or network. Put all your settings back to the way they
were. If the DB did not change, then look at OS and network.
Deron
On Sep 28, 2012 6:53 AM, "antthelimey" <antthelimey@gmail.com> wrote:
> On machine 1 - a table that contains between 12 and 18 million rows
> On machine 2 - a Java app that calls Select * on the table, and writes it
> into a Lucene index
>
> Originally had a fetchSize of 10,000 and would take around 38 minutes for
> 12
> million, 50 minutes for 16ish million to read it all & write it all back
> out
> as the lucene index
>
> One day it started taking 4 hours. If something changed, we dont know what
> it was
>
> We tracked it down to, after 10 million or so rows, the Fetch to get the
> next 10,000 rows from the DB goes from like 1 second to 30 seconds, and
> stays there
>
> After spending a week of two devs & DBA trying to solve this, we
> eventually
> "solved" it by upping the FetchRowSize in the JDBC call to 50,000
>
> It was performing well enough again for a few weeks
>
> then...one day... it started taking 4 hours again
>
> we tried upping the shared_buffer from 16GB to 20GB
>
> And last night... it took 7 hours
>
> we are using PGSQL 9.1
>
> does anyone have ANY ideas?!
>
> thanks much
>
>
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/Select-on-12-18M-row-table-from-remote-machine-thru-JDBC-Per...
> Sent from the PostgreSQL - performance mailing list archive at Nabble.com.
>
>
> --
> 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] 2+ messages in thread
end of thread, other threads:[~2012-09-28 15:10 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-09-28 13:52 "Select * " on 12-18M row table from remote machine thru JDBC - Performance nose-dives after 10M-ish records antthelimey <antthelimey@gmail.com>
2012-09-28 15:10 ` Re: "Select * " on 12-18M row table from remote machine thru JDBC - Performance nose-dives after 10M-ish records Deron <fecastle@gmail.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