On Fri, 2007-07-06 at 08:42 -0700, Mike Johnston wrote:
> 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).

Sorry, I think I read the question the wrong way around. It
probably is a bit faster to use a join query because you 
call the parser less. The point I meant to make was that the
I/O operations on the file-system/database-cache are the same 
either way.

Dan.


> Mike  
>        
> ---------------------------------
> Choose the right car based on your needs.  Check out Yahoo! Autos new Car 
> Finder tool.


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to