hi, I encountered a problem about indexing. I want to add index on timerecord field in table gw (shown as below) to speed up query relating with time. However, I use explain command (explain select * from gw where timerecord = '0109020000') to analyze the performace. As a result, it seems the query do not use this index. Would U tell me why and how to correct this !!
CREATE TABLE gw( sitename char(12), ip char(15), mac char(17), esn char(12), flag char(2), timerecord timestamp(10), KEY timerecord (timerecord) ); explain select * from gw where timerecord = '0109020000' table type possible_keys key key_len ref rows Extra gw ALL timerecord 8313193 where used *remark: The total records in the table gw are 8313193 ! regards, kmlau (I have already read the official document from mysql about index.) --------------------------------------------------------------------- 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