MySQL Forums
Forum List  »  Full-Text Search

MySQL Query Slow Speed
Posted by: Sasha Savino
Date: July 30, 2010 06:05AM


I'm new to MySQL therefore be patient with me. Thanks

Here's the issue,

I have a MySQL DB with 16 Tables. I already set one of the Tables (ItemID) as the Primary Key. When it comes to querying the ItemID Table this works perfectly.

Here's the problem, I have a second Table (Title) on the same DB as the ItemID Table that I need to execute as fast as the ItemID Table.

The Title Table basically contains a brief description of the item, Therefore If someone keys in "Air Conditioner" the query has to look at the Title Table.

The main issue is that the DB that I'm using has over 1,000,000 records and when it queries the Title Table it takes approximately 25-35 seconds to see the results. I'll be satisfied with at least 5 seconds.

What's the best method to query the Title Table?

What should I setup the Title Table as in MySQL? I heard FULLTEXT is an option but it's not retrieving all of the items with the keyed STRING.

Here's the query that I'm currently using:
$sql = "SELECT * FROM `$TblCat` WHERE MATCH(title) AGAINST('$name' '*$name' '$name*' '$name *' '* $name' '*$name*' IN BOOLEAN MODE)";

I'm using MySQL V5.0

Any Help will be Greatly Appreciated.

Options: ReplyQuote

Written By
MySQL Query Slow Speed
July 30, 2010 06:05AM
August 02, 2010 08:41AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.