Re: [sqlite] Newbie question, how multiple joins are executed

2011-06-20 Thread Ryan Johnson
On 20/06/2011 6:59 AM, Richard Hipp wrote: > On Mon, Jun 20, 2011 at 6:55 AM, Ryan Johnson wrote: >> IIRC sqlite does *not* do any join ordering optimizations and simply >> runs them in whatever order the query specifies. This can have >> unfortunate effects on runtime for some queries. Can anyone

Re: [sqlite] Newbie question, how multiple joins are executed

2011-06-20 Thread Richard Hipp
On Mon, Jun 20, 2011 at 6:55 AM, Ryan Johnson wrote: > IIRC sqlite does *not* do any join ordering optimizations and simply > runs them in whatever order the query specifies. This can have > unfortunate effects on runtime for some queries. Can anyone verify this? > > The SQLite query optimizer st

Re: [sqlite] Newbie question, how multiple joins are executed

2011-06-20 Thread Ryan Johnson
On 19/06/2011 8:03 PM, Simon Slavin wrote: > On 20 Jun 2011, at 12:58am, Lucas Cotta wrote: > >> I understand that for a query with a two tables join, SQLite will do a >> nested loop join with these two tables. >> But what about a query joining 5 tables? >> It would be like this?: >> >> for(table1

Re: [sqlite] Newbie question, how multiple joins are executed

2011-06-19 Thread Simon Slavin
On 20 Jun 2011, at 12:58am, Lucas Cotta wrote: > I understand that for a query with a two tables join, SQLite will do a > nested loop join with these two tables. > But what about a query joining 5 tables? > It would be like this?: > > for(table1 lines){ > for(table2 lines){ > for(t

[sqlite] Newbie question, how multiple joins are executed

2011-06-19 Thread Lucas Cotta
Hi! I understand that for a query with a two tables join, SQLite will do a nested loop join with these two tables. But what about a query joining 5 tables? It would be like this?: for(table1 lines){ for(table2 lines){ for(table3 lines){ Thanks.