8

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

It's probably so obvious that nobody ever asked it so I could not find something in Google either.

2 Answers 2

12

Try this:

SHOW INDEX FROM yourtable;
1
  • 1
    this should be best answer
    – Kamy D
    Feb 13, 2016 at 19:16
6

In the phpMyAdmin area, go to the table you want to look at. Open it's Structure.

Under the list of columns, there is a seperate table that lists the Indexes.

For what it's worth, usuaully, when you create a table, you give it an ID field. Something that is an auto-increment, and a primary key. It will automatically index that field.

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

1
  • 4
    This is correct. By default, the list is collapsed (there's a plus sign in front of "Indexes"; clicking the text will expand it). To make it open by default, see docs.phpmyadmin.net/en/latest/… Jul 24, 2014 at 21:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.