Forums Register Login

performance issue

+Pie Number of slices to send: Send
hi
i am developing a web application
i have 3 diffrent mysql database
one is local and other 2 are place on a another machine.
my problem is when i try to insert or get data to or from
that 2 databases(which is place on diffrent machine) it will take
lots of time.
some cases i am using PreparedStatement more then one
because of PreparedStatement my performance down?
please help me to inhance performance.
+Pie Number of slices to send: Send
PreparedStatements normally only have positive effects on performance*.

No sense in trying to optimize anything without fully understanding what the problem is. So, first step: work out where your bottleneck is. Are the queries run against these three instances identical (or as near to identical as makes no difference)? If they are not then I'd look at the queries first - can you generate execution plans for them or profile them? (not sure MysQL has tools for this, but if it does, use them). If they are, check the data in the three instances - do the slow ones have significantly more data? If they do, consider creating indices. If your data already has indices, check their statistics are up to date (if they are not, it could be your indices are not being used). And most simple of all, check your database servers are comparable - perhaps the remote ones are running on slow systems, or running out of resources?

If you have the same (or simmilar) queries running against the same (or simmilar) data, on the same (or simmilar) physical hardware, with all indices etc. up to date, then it sounds like it may be the network. See if you can prove this. Write a test case that runs the same SQL against the same database and run them locally and remotely (ideally using the same SQL that demonstrates the performance problem in you application). Is there a huge performance difference? If there is, speak to your network administrator about bandwidth.


(* there are exceptions to this rule, but they are not very common)
+Pie Number of slices to send: Send
You can track your jdbc and query performance using the jamon jdbc proxy driver:

http://www.jamonapi.com
If you like strawberry rhubarb pie, try blueberry rhubarb (bluebarb) pie. And try this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 617 times.
Similar Threads
DataSource in ejb-jar.xml
Regarding Port on same / different machines
WebStart Performance issue
Validation using single object responsible for handling data file.
POA to POA communication
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:37:53.