MySQL Scheduling and Locking Issues


  1. To how many of these does the LOW_PRIORITY modifier apply to?
    DELETE, INSERT, LOAD DATA, REPLACE











  1. 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.


  1. Reading from a table does not change it.











  1. 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.



  1. Which statement issues a lock on tables?











  1. 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.


  1. How many of the following implement the default scheduling property of MySQL?
    MyISAM, MERGE, MEMORY











  1. 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.



  1. Which of these has higher priority?
    writes, reads











  1. 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.