How do I create an index with PHPmyadmin?
I have a database with 5,000 rows of
ID | IP | DATE
Before added data to this table I made id as Primary Key,
The website use this query:
mysql_query("SELECT * FROM users WHERE ip = '$ip'");
I read today that indexes can speed up and performance,
and in my case how do i need to add index to IP column,
I am to phpmyadmin and to actions I see “Add unique index” and “Add index” options,
Im new in this, appreciate your help, thank you.
Click on the icon that says “index” in the row for
ip. (It’s the one with the lightening bolt). Don’t chooseprimary keyorunique. Just index.