dhimok Posted July 16, 2007 Share Posted July 16, 2007 Hello. I have this database where I get like thousand of searches every day. But I think it is running a bit slow. Do you have any tips on how to improve it and keeping it flow. Thanks a lot Link to comment https://forums.phpfreaks.com/topic/60151-some-database-search-tips/ Share on other sites More sharing options...
infid3l Posted July 16, 2007 Share Posted July 16, 2007 If you only need to return X amount of results, always add this to the end of your SQL query: LIMIT x For example: SELECT username FROM user_db WHERE name='Ted' LIMIT 5 Link to comment https://forums.phpfreaks.com/topic/60151-some-database-search-tips/#findComment-299233 Share on other sites More sharing options...
ryeman98 Posted July 16, 2007 Share Posted July 16, 2007 If you only need to return X amount of results, always add this to the end of your SQL query: LIMIT x For example: SELECT username FROM user_db WHERE name='Ted' LIMIT 5 That will work good too. You may also want to look up Pagination to limit the amount of results per page. Good luck! Link to comment https://forums.phpfreaks.com/topic/60151-some-database-search-tips/#findComment-299236 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.