PhpMyAdmin: how to check if a field has an index?

This may be very obvious, but I don't know how to check if a field has an index with phpMyAdmin.

It is probably so obvious that no one ever asked about it, so I could not find something on Google.

+6
source share
2 answers

Try the following:

SHOW INDEX FROM yourtable; 
+8
source

In the phpMyAdmin area, navigate to the table you want to look at. Open it.

The column list has a separate table listing indexes.

For what it's worth, usuaully, when you create a table, you give it an identifier field. Something that is auto increment and primary key. It automatically indexes this field.

At least my host does this. I cannot verify that all hosts act in this way.

+4
source

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


All Articles