To clarify, if I have the three join SELECT statement in code or i have the same three join SELECT in a view, once I do the prepare it should pretty much be same as in my case they are simple one-to-one joins returning 0 or 1 row max.
Thanks Mike Joe Wilson <[EMAIL PROTECTED]> wrote: --- Mario Figueiredo wrote: > On 7/6/07, Joe Wilson wrote: > > --- 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. > > > > As long as your VIEW/subquery does not make use of > > UNION/EXCEPT/INTERSECT, then it's usually the same speed. > > > > I would not recommend complex querying of views/subquery of unions > > of selects with large result sets within SQLite. The select will run > > much faster and use far less memory if you manually expand these > > queries to not make use of the VIEW. SQLite will not perform this > > optimization for you. > > Unless performance issues are really at a premium, I would probably > advise exactly the opposite. In other words, use views if you can, > don't use them only when you must not. No one is disputing views are useful. I just wished they were faster in SQLite and used less memory on large datasets in compound queries, so you don't have to manually rewrite queries to get good performance: http://www.sqlite.org/cvstrac/tktview?tn=1924 ____________________________________________________________________________________ Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] ----------------------------------------------------------------------------- --------------------------------- Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games.