php - Boolean search on database with 5 million rows, very slow -
i have script when user searches "apples", there coloumn related searches "shiny apples", , "rotten apples", etc.
problem searches database has 5,600,000 rows , mysql lagging badly.
here code:
$get = mysql_query("select keyword searches match (keyword) against ('".mysql_real_escape_string(preg_replace('#([\s]+)#', '$1', $title))."' in boolean mode) limit 0,15");
this taking long time process , have active website searches getting performed every second, can recommend me tips?
thanks!
you need indexes. have had experiences in past creating indexes got significant performance gain.
Comments
Post a Comment