MySQL Forums
Forum List  »  MyISAM

Re: would like best table/index structure advice?
Posted by: Rick James
Date: March 03, 2009 08:46PM

Thanks.
No indexes??

The EXPLAIN has several clues that it is doing a full table scan -- hitting ~20K rows. This takes time.

If id is unique, suggest you add PRIMARY KEY (id). Here's the syntax:
ALTER TABLE AAA
  ADD PRIMARY KEY(id);

If "id" is not unique, then I suggest
ALTER TABLE AAA
  ADD INDEX(id, last);

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: would like best table/index structure advice?
2921
March 03, 2009 08:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.