MySQL Scheduling and Locking Issues
- To how many of these does the LOW_PRIORITY modifier apply to?
DELETE, INSERT, LOAD DATA, REPLACE
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
The LOW_PRIORITY statement modifier influences the default scheduling policy of MySQL. This keyword applies to all the four: DELETE, INSERT, LOAD DATA, REPLACE. It also applies to UPDATE.
- Reading from a table does not change it.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
Reading does not change the table. There is no reason one reader should prevent another from accessing the table. So a read lock enables other clients to read the table at the same time.
- Which statement issues a lock on tables?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
Locks can be acquired and released explicitly by issuing LOCK TABLES and UNLOCK TABLES statements. Normally the server’s lock manager automatically acquires locks as necessary and releases them when they no longer are needed.
- How many of the following implement the default scheduling property of MySQL?
MyISAM, MERGE, MEMORY
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
The MyISAM, MERGE and the MEMORY storage engines implement the default scheduling policy of MySQL with the help of the table locks. Whenever a client accesses a table a lock for it must be acquired first.
- Which of these has higher priority?
writes, reads
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
A client performing an operation that modifies a table is a writer and the client that performs a retrieval from the table is a reader. The writes have higher priority than reads.