When I manually create tables in MySQL, I add indexes one at a time for each field that I think I will use for queries.
When I use phpMyAdmin to create tables for me, and I select my indexes in the create-table form, I see that phpMyAdmin combines my indexes into 1 (plus my primary).
What’s the difference? Is one better than the other? In which case?
Thanks!
This actually depends on your queries. Some queries make better use of multicolumn indexes, some not.
EXPLAIN is your friend.
http://dev.mysql.com/doc/refman/5.6/en/explain.html
Also a very good resource is here:
http://dev.mysql.com/doc/refman/5.6/en/optimization-indexes.html