On 18 Jul 2010, at 5:46am, Peng Yu wrote:

> This question may be trivial. But I'm wondering, whether I should
> create one index on multiple columns or create multiple indexes, each
> of which is on a single column.
> 
> The condition of the 'select' statement can be a logic operation on
> any of the column of the table and their combinations. I think that it
> may be better to create an index on each column. But I'm not so sure.

We would have to see an example SELECT to be sure.  But even if you create one 
index on multiple columns, the order of the columns in the index matters.  If 
you had three columns you could create six indexes to get each possible 
combination.  Probably easier to explain to us your SELECT statements.

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

Reply via email to