Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8361747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:46:09+00:00 2026-06-09T11:46:09+00:00

I am using mysql [InnoDB engine] Index but the query response is still very

  • 0

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.

enter image description here

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.

enter image description here

please guide me what I am doing wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T11:46:11+00:00Added an answer on June 9, 2026 at 11:46 am

    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 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're using MySQL with Innodb Engine storage. We have an evented environment that sends
I am using Engine InnoDB on my MySQL server. I have a patch script
I'm a little confused. I'm using MySQL 5+ with InnoDB as my engine. If
I am using the InnoDB MySQL engine. I am doing the encryption in a
i'm trying to develop a client-server chat application using java servlets and mysql(innoDB engine)
We have a very large (10million+) row table stored in MySql using the InnoDB
I am using mysql and mysql workbench. I created 5 tables with innodb engine.
We're using MySQL with InnoDB storage engine and transactions a lot, and we've run
I have one MySQL table using the InnoDB storage engine; it contains about 2M
I'm using a table named url2 with tje MySQL InnoDB Engine. I'm having so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.