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(table3 lines){
>          ....

You can use JOIN any number of times in a SELECT query.  SQLite will work out 
an optimal way to access each table.  You can speed things up a great deal by 
having useful INDEXes created.

If you find your SELECT growing too complicated it's a sign that you need to 
re-think your database structure.

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

Reply via email to