php - Autosuggestion works too slow -
i have more 100,000 records in books table, database mysql. creating autosuggestion using php. working slow. think because of bulk data. there solution searching data in effective manner , how can improve speed of searching process?
here code:
<?php $search=$_requet['searc']; $qry="select book_name books book_name '%$search'"; $result=mysql_query($qry); echo "<ul>"; while($rows=mysql_fetch_array($result)) { echo "<li>".$rows['book_name']."<li>; } echo "</ul>"; ?>
apply indexing or can use fulltext indexing , search http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
Comments
Post a Comment