I am using mysql [InnoDB engine] Index but the query response is still very slow (high response time):
I studied here Full Text Search In MySql that
we can’t be implemented on Mysql default innoDB storage engine tables.
I created a auto-suggest where user type City name then my query fetches City, Country name format.
$search = $_GET['term'];
mysql_query("CREATE INDEX index_plc ON projects(pro_loc_city)");
$result = mysql_query("SELECT CONCAT_WS(', ', p.pro_loc_city, c.country_name)
as location FROM projects p
LEFT JOIN countries c ON c.country_id = p.country_id
WHERE p.pro_loc_city LIKE '%$search%'
GROUP BY p.country_id") or die('Something went wrong');
mysql_query("DROP INDEX index_plc ON projects");
In firebug the response time is approx 5 to 3 seconds.

Projects Table
----------------------------------
pro_id | pro_loc_city | country_id
----------------------------------
1 Karachi 50
2 Lahore 60
3 Karachi 50
4 Abc 70
5 Karachi 50
Countries
-------------------------
country_id | country_name
-------------------------
50 Pakistan
60 A Country
70 B Country
This is what Firebug says.

please guide me what I am doing wrong.
Creating an index on a large table is an expensive operation. Indexes are in most cases there to stay. Creating one, executing a query and dropping it – won’t help the speed. Try creating the index, leaving it and query again 🙂