ballouta Posted September 10, 2009 Share Posted September 10, 2009 Hello, I am wondering if there is other techniques for searching a big text database rather than the the turorial here: http://www.phpfreaks.com/tutorial/simple-sql-search Thank you Quote Link to comment https://forums.phpfreaks.com/topic/173758-solved-searching-big-database/ Share on other sites More sharing options...
dreamwest Posted September 10, 2009 Share Posted September 10, 2009 How big are the fields?? If you have say a million rows, your only going to select 20 or so at a time....20 isnt so much I have 2 ables at the moment with over 800,000 rows and they query fast Quote Link to comment https://forums.phpfreaks.com/topic/173758-solved-searching-big-database/#findComment-915940 Share on other sites More sharing options...
ballouta Posted September 10, 2009 Author Share Posted September 10, 2009 oh, No it is around 10.000 rows only and the fields i am searching in are: title (varchar) and content (longtext) Thank you Quote Link to comment https://forums.phpfreaks.com/topic/173758-solved-searching-big-database/#findComment-915942 Share on other sites More sharing options...
dreamwest Posted September 10, 2009 Share Posted September 10, 2009 Heres what im using it queries my 800,000 row table in less than 0.003 seconds $search=$_REQUEST['search_id']; $search = mysql_real_escape_string($search); $result = mysql_query("SELECT distinct * from video where (title like '%{$search}%') group by title limit 40 ); while ( $tmp = mysql_fetch_assoc( $result ) ) { echo $tmp['whatever']."<br>"; } Quote Link to comment https://forums.phpfreaks.com/topic/173758-solved-searching-big-database/#findComment-915949 Share on other sites More sharing options...
ballouta Posted September 10, 2009 Author Share Posted September 10, 2009 Thank You Quote Link to comment https://forums.phpfreaks.com/topic/173758-solved-searching-big-database/#findComment-915968 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.