UUID performance in MySQL?

前端 未结 9 1457
猫巷女王i
猫巷女王i 2020-11-27 10:14

We\'re considering using UUID values as primary keys for our MySQL database. The data being inserted is generated from dozens, hundreds, or even thousands of remote computer

9条回答
  •  隐瞒了意图╮
    2020-11-27 10:44

    Since the primary key is generated decentralised, you don't have the option of using an auto_increment anyway.

    If you don't have to hide the identity of the remote machines, use Type 1 UUIDs instead of UUIDs. They are easier to generate and can at least not hurt the performance of the database.

    The same goes for varchar (char, really) vs. binary: it can only help matters. Is it really important, how much performance is improved?

提交回复
热议问题