Elcin Recebli <[EMAIL PROTECTED]> wrote: > Hi. > > You're joining the table with itself using 'id'. However, there's no index > just on that field. I'm not sure how exactly SQLite utilises indices, but it > might be unable to use index on (id,key,source) triple to optimise > calculation of "m1.id = m2.id". >
SQLite is able to use the prefix of an index. So in this case, the index on (id,key,source) would be used to optimize m1.id=m2.id. -- D. Richard Hipp <[EMAIL PROTECTED]>