Same index name for two tables

前端 未结 3 1313
天命终不由人
天命终不由人 2021-01-05 07:05

I am working on building a small Mysql database for our team. For two tables in my db, I used the same index name.

Would there be any performance hit?

I did

相关标签:
3条回答
  • 2021-01-05 07:51

    No. The index name is completely inconsequential to performance.

    0 讨论(0)
  • 2021-01-05 07:58

    Index names are per table, there shouldn't be any concern.

    0 讨论(0)
  • 2021-01-05 08:08

    Index names are specific to each table. You cannot have two indexes of the same name in one table, but you can have many indexes of the same name, one for every table. Index names are irrelevant for day-to-day performance. They're simply there to provide a nice user-friendly way to refer to the index without having to list all the fields in the index. e.g. it's easier to say alter table XXX drop key friendlyname than alter table XXX drop key (field1, field2, field3, field4, field5, etc...)

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