Guillaume Fougnies wrote:
Hello,

I'd like to know if the management of multiple indexes
on select statement is in the TODO list of SQLite?

No.


On joined request, this lack is a real performance killer.

Example:
select t1.id,t2.name
from t1,t2
where t1.id IN(a00,b00, ....,z99) and t1.t2id = t2.id;

For now, SQLite use by default the wrong index and make
a full join ignoring the 'IN' restriction. I need
to force the index selection like this to gain a little
speed:

select t1.id,t2.name
from t1,t2
where t1.id IN(a00,b00, ....,z99) and +t1.t2id = t2.id;

I think you are in error. In the situation about, SQLite will never chose to use an index on t1.t2id. It will always use the t1.id index (if there is one) for locating rows in table t1 and it will use the index on t2.id for locating rows in t2. This is true regardless of whether or not you attempt to disable the indices using the "+" sign.

If you need help optimizing a query, post all relevant parts
of the schema and the query you are working on and we will
take a look.



--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565



Reply via email to