Re: Java and mysql high concurrency bottlenecks solutions
Posted by: Filipe Silva
Date: June 26, 2017 06:15PM

There is no generic best solution for all cases.

I would suggest using server side prepared statements (useServerPrepStmts=true) cache statements (cachePrepStmts=true and other cache related options) as much as you can, if the number of different queries you need to run is relatively small.

As a different approach you could think of collecting data in some internal format and periodically bulk insert the data into the database.

Each solution has advantages and limitations. You should do a lot of testing and weight the pros and cons of each alternative you find.

As of Java being able to handle the amount of concurrency you want, it all depends on the underlying systems too. So you better test it as much as you can, look for good thread pool managers and think of different ways of working your problems if you need.

Hi hope that helps.

Options: ReplyQuote




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.