android - No performance gain using LIMIT on SQLite query? -


I have a SQLite database, in which 460,000 words are alphabetical, and I want to check whether a particular letter or Prefix Select the word

  where the word like 't%' LIMIT 1  

I hope this query will start to return the first letter. The problem is that on the Android OS, this query is slow. If I change it to:

  Select word from where word1 like "move%" it runs very fast. The difference is that there are 27,300 words that begin with "T" and there are only 60 words starting with "move".  

I expected LIMIT 1 to stop the search and will return the first hit. But apparently it is not how it works. Database is properly indexed:

  create table "n" ("word" lesson (12,0) No, tap calllet encase, primary key ("word"));  

I am stuck in this problem. Any advice?

Query executed code is written in Unity:

  Public Butt CheckIford listCountainAddartTestStars (string word) {string query = "where to pick a word from" "+ word +" % 'LIMIT 1 "; SQLiteQuery qr = new SQLiteQuery (db, query); if (qr.Step ()) {// string result = qr.GetString (" word "); // actual result of qr.Release () There is no need to take care; The truth is back;} Qr.Release (); The description is false;}  


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -