search

Home  >  Q&A  >  body text

请问mysql innodb的非自增ID主键的效率?

table:
news_id user_id

ALTER TABLE table DROP PRIMARY KEY, ADD PRIMARY KEY (`news_id`, `user_id`) USING BTREE;

这种情况下效率有多少影响?

PHP中文网PHP中文网2787 days ago688

reply all(1)I'll reply

  • 黄舟

    黄舟2017-04-17 13:47:45

    Whether the primary key is auto-incremented does not affect the efficiency of the original primary key. Both auto-increment and primary key are independent functions.

    reply
    0
  • Cancelreply