MySQL Forums
Forum List  »  Full-Text Search

Re: Query the Index?
Posted by: Rick James
Date: October 21, 2010 09:07AM

Sure...
CREATE TABLE foo (..., word VARCHAR(33) ..., INDEX(word), ...);
SELECT word FROM foo WHERE word LIKE 'b%';
will reference only the index.

To confirm that, do EXPLAIN; notice that it will say "Using index". This means that it can execute the SELECT entirely from the index.

And, if you want the work done for you, consider
https://developer.yahoo.com/yui/autocomplete/



Edited 1 time(s). Last edit at 10/21/2010 09:09AM by Rick James.

Options: ReplyQuote


Subject
Views
Written By
Posted
5293
October 20, 2010 07:40AM
Re: Query the Index?
2015
October 21, 2010 09:07AM
2330
October 25, 2010 02:08AM
1989
October 28, 2010 08:04AM
2089
November 01, 2010 06:37AM


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.