I have a huge (poorly designed) InnoDB table with millions of records. When I ask this guy, the execution lasts a few minutes. How can I guarantee that during this time no other operations (queries, inserts or updates) will be affected? The last thing I want is locks or timeouts for others while my request is being executed.
Here is the actual request.
SELECT html FROM cms_log where class_name ='main_pages' order by date_created desc;
Currently, the class_name field is not indexed, but that is not what I can change at the moment.
This post suggested using
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
before running my request. But this is a rather old post, and it only talks about castles. Can someone confirm that this is the way to go or give the best way to run the most secure request? (I also donβt care about dirty and phantom readings, I just donβt want to influence other operations).
source share