sunnysidesounds Posted October 19, 2009 Share Posted October 19, 2009 Hey guys, I know this is more of a MYSQL question then a php question. But I do feel like both go hand in hand. I just wanted some input as to how I could improve the performance of this query: $query = 'SELECT '.PROJECT_TABLE.'.uid, '.PROJECT_TABLE.'.title, '.PROJECT_TABLE.'.description, '.USER_TABLE.'.proj_id FROM '.PROJECT_TABLE.', '.USER_TABLE.' WHERE '.PROJECT_TABLE.'.title LIKE "%'.$searchProjectNoTags.'%" OR last_name LIKE "%'.$searchProjectNoTags.'%" AND '.USER_TABLE.'.proj_id = '.PROJECT_TABLE.'.uid GROUP BY title LIMIT ' . $startLimit . ', ' . $displayPerPage. ''; This is basically a simple search form that searches in two tables. Project Table and User Table. Thanks in advance Quote Link to comment Share on other sites More sharing options...
Mchl Posted October 19, 2009 Share Posted October 19, 2009 Start with this: http://dev.mysql.com/doc/refman/5.1/en/query-speed.html 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.