1 / 17

B+Tree & MVCC @ InnoDB

B+Tree & MVCC @ InnoDB. Wen Mengtian. InnoDB uses B+Tree. B+Tree & MVCC @ InnoDB. Structure of B+Tree. B+Tree & MVCC @ InnoDB. via. B+Tree & MVCC @ InnoDB. via. B+Tree & MVCC @ InnoDB. What is MVCC? Multi-Version Concurrency Control. Why MVCC? Support transaction. Avoid lock .

scout
Download Presentation

B+Tree & MVCC @ InnoDB

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. B+Tree & MVCC @ InnoDB Wen Mengtian

  2. InnoDB uses B+Tree. B+Tree & MVCC @ InnoDB

  3. Structure of B+Tree B+Tree & MVCC @ InnoDB

  4. via B+Tree & MVCC @ InnoDB

  5. via B+Tree & MVCC @ InnoDB

  6. What is MVCC? Multi-Version Concurrency Control. Why MVCC? Support transaction. Avoid lock. B+Tree & MVCC @ InnoDB

  7. Copy-On-Write? B+Tree & MVCC @ InnoDB

  8. InnoDB supports 4 type of MVCC level. SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ; Possible choices: READ UNCOMMITTED | READ COMMITTED REPEATABLE READ | SERIALIZABLE Default: REPEATABLE READ B+Tree & MVCC @ InnoDB

  9. READ UNCOMMITTED Any uncommitted change will be selected. B+Tree & MVCC @ InnoDB

  10. READ COMMITTED Any COMMITTED change will be selected. B+Tree & MVCC @ InnoDB

  11. REPEATABLE READ Any COMMITTED change will NOT be selected. That is, any same selects will give the SAME result. B+Tree & MVCC @ InnoDB

  12. SERIALIZABLE Same as REPEATABLE READ, except for the SELECT. It auto change SELECT to SELECT IN SHARE MODE. (Lock S) B+Tree & MVCC @ InnoDB

  13. ALL THE LEVEL WILL LOCK THE DATA WHEN UPDATE AFTER IT’S: CHANGED OR SELECT FOR UPDATE Cause an X lock is locking. B+Tree & MVCC @ InnoDB

  14. How does all that works? B+Tree & MVCC @ InnoDB

  15. via B+Tree & MVCC @ InnoDB

  16. See: B+Tree index structures in InnoDB By Jeremy Cole 深入MySQL内核By 网易何登成 淘宝网综合业务平台团队博客 MySQL :: Developer Zone Simple guide of MVCC and relative By 陈剑雄 And more. B+Tree & MVCC @ InnoDB

  17. Thank you. Q&A. B+Tree & MVCC @ InnoDB

More Related