On 24 Nov 2011, at 7:56am, Gaurav Vyas wrote:

> I used the following syntax to create index
> "CREATE UNIQUE INDEX persons_1x
> ON persons (pid,hid);"

This index cannot be used for a search on your 'hid' column.  Imagine you had 
it written out, and wanted to find all the records with the same 'hid'.  You'd 
still have to search the entire list !

So create an index on (hid,pid) instead.

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to