Micha Schopman wrote: > Browsers nowadays have sufficient possibilities to take out that last > postback you mentioned. I don't see any need for a new server request. > Get the data once, store it in Javascript arrays.. and based on the > author selection show the articles. One of the main principles of Rich > Internet Applications. And yes, Javascript driven sites like gGail are > also examples of RIA's. > > One of the most used bad practices is the use of extra queries to > accomplish getting data. That is the NR.1 cause of bad application > performance no matter what language you are programming in. Prevent new > database connections at all costs where possible, seriously. > > I haven't seen a single application perform well with such code > > <cfloop query="cars"> > <cfquery> > select Tires where carid = > </cfquery> > <cfquery> > select OilTypes where carid = > </cfquery> > <cfquery> > select HifiSets where carid = > </cfquery> > <cfquery> > select HorsePower where carid = > </cfquery> > <cfquery> > select Engines where carid = > </cfquery> > <cfquery> > select ServiceData where carid = > </cfquery> > </cfloop> > > Now we have all types of data nicely ordered ... ow.. it performs like a > duck .. ;)
Yup, and that's why recordset caching exists. Your example is at best cartoony. No programmer worth their salt is going to write code like that. There are situations where joins are appropriate, and where they're not. The situation that triggered this thread is one where they're not, whereas something like the situation outlined above probably would. -- Keith Gaughan, Developer Digital Crew Ltd., Pembroke House, Pembroke Street, Cork, Ireland http://digital-crew.com/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183855 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

