concurrent READ and WRITE on MySQL Table

前端 未结 1 1630
情书的邮戳
情书的邮戳 2021-01-06 02:55

If a table is frequently written from front end and same table has to be as frequently searched as well. Both are performance critical.

For example a POST table whic

相关标签:
1条回答
  • 2021-01-06 03:02

    This depends on the Storage Engine of the Table

    InnoDB

    InnoDB supports MVCC and 4 Transaction Isolation Levels

    • READ-UNCOMMITTED
    • READ-COMMITTED
    • REPEATABLE-READ (default)
    • SERIALIZABLE

    This allows for INSERTs, UPDATEs, DELETEs, and SELECTs to live harmoniously 99.999% of time

    MyISAM

    This is a totally different playing field. By default, every INSERT, UPDATE, and DELETE locks the entire table. INSERTs can have table locking disabled by setting concurrent_insert to 2. (See Concurrent Inserts for more information). Otherwise, UPDATEs and DELETEs can still wreak some havoc doing full table locks.

    0 讨论(0)
提交回复
热议问题