MySQL - reorder indexes in a table?

Is it possible to reorder indexes in a MySQL table? I have a large table with approximately 20 indexes, but since I created them for several years, they are no longer logically ordered. I would like them to have the same order as the columns in the table. I use Navicat, but I see no way to move the index up or down in the list. Is it possible?

UPDATE: I just found out that Postgresql can't even reorder columns, let alone indexes! And to all those people who say that I should use views, and that the order of the columns is not important: of course! Columns and indexes should be logically ordered in the design interface. Most people now use the graphical interface to edit their tables!

I just can't believe what a basic one like this is not implemented. This is 2011 guys!

+3
source share
1 answer

Cannot reorder index list. It may not matter inside MySQL, but if you want to reorder, the only way is to drop and recreate them as needed.

, , @btilly, . , , , , . OTOH, . , , .

+1

Source: https://habr.com/ru/post/1793214/


All Articles