Hey! Yes, indeed, it is doing a sequential scan according to EXPLAIN. Still, the slowness is unbelievable in such a small database. The whole db takes 11Mb, and doing a LEFT JOIN between a few hundred and a few thousand of rows on a "Core 2 Duo" taking 6 seconds is... I don't even know what it is :P There must be something very strange going on... I suppose it is not possible to create indexes on views, right?
I'll play some more with queries and try to figure out if I can tweak this. If not, then I guess I'll unfortunately have to move to PostgreSQL :-( Cheers! Hugo Ferreira On Dec 31, 2007 8:42 PM, Griggs, Donald <[EMAIL PROTECTED]> wrote: > Hello Hugo, > > If you preceed a SELECT with the string > EXPLAIN QUERY PLAN > sqlite will make it clear which, if any, indices it would use when > running the select. > > Sqlite, unlike some of the "non-light" databases, uses a maxium of one > index per table per select, I believe. > > You may want to look at the ANALYZE command. > > You really do want a CROSS JOIN in the first case, is that right? > > I'm not sure if this is info you're looking for. > > Regards, and Happy New Year to all, > Donald G. > > > > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > > ----------------------------------------------------------------------------- > > -- スプーンが ない