I have a requirement that I need to update a MySQL table continuously and at the same time read the table for use. Dirty read is acceptable. Is this operation permitted in MySQL? What do I need to do this operation in a Java program?
Sure, you just need to have transactions that query the and transactions that update the DB. These can be in different/same threads or processes. If dirty reads are acceptable, make sure your isolation level in MySQL is READ UNCOMMITTED. To understand the importance of isoation levels, see:
http://en.wikipedia.org/wiki/Isolation_%28database_systems%29
To set this in MySQL:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.