On 28 Jun 2011, at 9:58pm, Lazarus 101 wrote:

>> You should make an index on the columns 'file_id' and 'data_type' from the
>> 'DATA' table.  This will allow it to be searched far more quickly.  Your
>> command will be something like
>> 
>> CREATE UNIQUE INDEX dfd ON data (file_id,data_type)
>> 
>> Then do the above testing again.
> 
> tried that and it didn't help much

Something is wrong with your logic or programming.  Having this index should 
make a huge difference in the speed of lookup.  How are you finding the entries 
in the TABLE called 'data' ?

Actually, as Jan posted, instead of the above index do this one:

CREATE UNIQUE INDEX dfdv ON data (file_id,data_type, value)

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

Reply via email to