title: SQLite data retrieve with select taking too long
body: <p>I have created a table with sqlite for my corona/lua app. It's a hashtable with ~=700 000 values.The table has two columns, which are the hashcode (a string), and the value (another string). During the program I need to get data several times by providing the hashcode.</p>
  
  <p>I'm using something like this code to get the data:</p>
  
  <pre><code>for p in db:nrows([[SELECT * FROM test WHERE id=']].."hashcode"..[[';]]) do
      print(p) 
      -- p = returned value --
  end
  </code></pre>
  
  <p>This statement is though taking insanely too much time to perform</p>
  
  <p>thanks,</p>
  
  <p>Edit:</p>
  
  <p>Success!
  the mistake was with the primare key thing.I set the hashcode as the primary key like below and the retrieve time whent to normal:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS test (id STRING PRIMARY KEY , array); 
  </code></pre>
  
  <p>I also prepared the statements in advance as you said:</p>
  
  <pre><code>stmt = db:prepare("SELECT * FROM test WHERE id = ?;")
  [...]
  stmt:bind(1,s)
  for p in stmt:nrows() do
  </code></pre>
  
  <p>The only problem was that the db file size,that was around 18 MB, went to 29,5 MB</p>