I want to know, is it possible to use a mySQL database simultaneously from a PHP website and a Java Website both making continous read and write operations. Are there any tradeoffs?

Does connection pooling affect this?

5 Years
Discussion Span
Last Post by joehms22

From my understanding MySQL locks a unit upon writing to ensure no reads happen during that: so writing blocks any reading you do. Depending on the storage engine you use (more on that here) it may only block a row; or the entire table; you should probably choose to do rows, although it takes more resources to do that, as your DB will be accessed by multiple applications that may not hold their own caches, etc. and blocking one sounds like it would be disasterous.

A connection pool should reduce the amount of stress on your DB making connections and the amount of time it takes for the Java or PHP to fetch data, it should help, but not during the query aspect.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.