MySQL Forums :: Newbie :: index performance on "limit" condition


Advanced Search

index performance on "limit" condition
Posted by: Ed Wong ()
Date: February 21, 2010 09:11PM

hi all,

some questions on index performance

query 1: select * from table where title='abc' limit 20;
(title is not indexed)
will the query go through the whole table content or just the first 20?
the "explain" statement shows that it go over all rows... but want to confirm

query 2: select * from table where title not like 'abc%';
(title is indexed -> trying to look for title that does not begin with abc)
will the query go through the whole table?

thx

ed

Options: ReplyQuote


Subject Written By Posted
index performance on "limit" condition Ed Wong 02/21/2010 09:11PM
Re: index performance on "limit" condition Guelphdad Lake 02/21/2010 09:19PM
Re: index performance on "limit" condition Ed Wong 02/21/2010 09:25PM
Re: index performance on "limit" condition Rick James 02/22/2010 11:10AM
Re: index performance on "limit" condition Guelphdad Lake 02/22/2010 10:48AM


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.