ivytony Posted September 1, 2008 Share Posted September 1, 2008 I'm trying to create an application using PHP + MySQL which allows people to find a url stored in the database. Suppose there are thousands of urls stored in the database (like http://www.phpfreaks.com/forums/index.php/board,62.0.html, http://www.phpfreaks.com/forums/index.php/board,7.0.html, http://www.phpfreaks.com/forums/index.php/board,1.0.html, etc), how can I make the search for a particular url more efficiently? Can I still use this: Select url from url_table where url='$search_url' ? Is this efficient when there are many many urls stored in database? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted September 1, 2008 Share Posted September 1, 2008 make sure you have indexing on the url field to aid in this You can also use a LIKE query to find urls "like" the inputted values however those will be slower but yield more results Quote Link to comment Share on other sites More sharing options...
fenway Posted September 2, 2008 Share Posted September 2, 2008 Searching "URLs" doesn't sound particularly user friendly... Quote Link to comment 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.