>>>When I run a query "SELECT count(*) as count FROM tbl where col_1 like 'value1'", the query can take up to 45 minutes to bring back a result if there are >>>large number (sometimes 1 million plus) of records that match 'value 1'.
Use EXPLAIN to make sure that you're using an index that you have on 'col_1'. I'm not sure why you have an index on col1 and col2, perhaps having a single index on col_1 will help. . Also, if you're not using wildcards, you should use '=' instead of 'like' Chris --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php