Very slow when using remote server
Posted by: Brian Sparacino
Date: January 17, 2012 08:26AM

I have a thread open at the oracle board too: https://forums.oracle.com/forums/thread.jspa?threadID=2333993&tstart=0

I am connecting to mysql on my remote webserver, doing some bulk inserts with prepared statements.
In this test case there are 849 rows which is about 70kb of data.
I have timed how long it takes for the executeBatch() function to run and on the remote server it's about 32sec.
On my local dev server it ran in about 381ms... thats an 86x difference

For 70kb worth of data, there is definitely a problem.
When I insert the data to the remote server, I can see the rows being slowly added in phpmyadmin.
Connecting to the remote server takes about 600ms which is fine.

The dev server and the remote server are running the same OS and the same version of mysql.
I can't figure out why it is so slow when inserting to the remote server.
It's as if the batch query is not being sent all at one, but in very small chunks which is causing a lot of latency.
Is there any way to force the statement to be sent all at once?



Edited 1 time(s). Last edit at 01/17/2012 08:26AM by Brian Sparacino.

Options: ReplyQuote


Subject
Written By
Posted
Very slow when using remote server
January 17, 2012 08:26AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.