On 29 Jun 2011, at 2:26am, Lazarus 101 wrote:

> the select statement is
>   SELECT * from files left join data on files.file_id=data.file_id;

So you read all the records for the correct file_id, and deal with each one as 
you find it, ignoring those you don't want.  Hmm.  I don't see why your app 
isn't far faster with the index.  Can an SQLite expert explain it ?

By the way, when SQLite does create the index automatically it deletes it when 
the SELECT finishes.  So in your real application it'll keep recreating the 
index for every SELECT.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to