search

Home  >  Q&A  >  body text

乐观并发控制 - 为何Redis用乐观锁,而MySQL数据库却没有

想知道为何Redis用乐观锁,而MySQL数据库却没有用。乐观锁说白了并不是锁,而只是版本号检查而已,为何Redis不像MySQL那样用真正的锁机制呢?

巴扎黑巴扎黑2836 days ago741

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-04-17 12:02:22

    Optimistic locking also has advantages, it can reduce overhead, but it will cause dirty data to enter the database. Redis should be for efficiency (of course I guessed it myself), as well as the simplicity of commands.

    reply
    0
  • Cancelreply