n Fri, 2007-07-06 at 07:18 -0700, Mike Johnston wrote: > I have to join three tables to retrieve bits of data from each. I'm wondering if I use a view are there any performance issues vs. issuing the complete 3 table join query in code. > > Also, is it quicker to have sqlite do joins on primary keys between tables instead of doing three separate single table queries on the primary key in code?
>The short answers are probably not and no. >But it depends on the exact view you're defining. If it's just a join, >no GROUP BY or ORDER BY or aggregate functions, it should be fine. >Dan. They are very simple select statements retrieving exactly one row. On the second point, are you saying that doing a select with a three table join is no quicker than having three groups of sqlite_prepare, sqlite_step sequences for single table, single row lookups? That just seems a little counter-intuitive (at least to me). Mike --------------------------------- Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.