I think it would make the individual queries harder to use if you only needed one for some reason. You could add lots of boolean 'useThispart' and 'useThatPart' but it feels messy.
If memory on the server is in abundance you may want to cache the worst performing queries in memory OR you could also cache the full page (or parts of the page) to the file system and regenerate the file if any of the data changes on insert, update or delete. If performance of the page is an issue I would look at caching BEFORE rolling all my queries into a big stored procedure ball. If its a one-off situation you can maybe live with the stored proc but as a general rule would be a bad idea. Alan ________________________________ From: "Dawson, Michael" <[EMAIL PROTECTED]> To: [email protected] Sent: Tuesday, November 18, 2008 4:12:09 AM Subject: [CFCDEV] Stored Procedures, Multiple Recordsets and Components I'm toying with the idea of using store procs on a project. This project requires about 10 queries to build a single page. For example, I have a application that needs to display header information about the page, information about a student, a list of the student's advisors, problems the student may be having, people who can view the information and some blog-like replies. About the only things in common, for all of these queries, is a common ID number and the student's ID number. I have thought about using stored procs for this project, but knowing that cfstoredproc can return multiple recordsets, does this somehow break a component's encapsulation? If I think about the CFC, in terms of objects, the page header information is not at all related to a student's issues. Nor are the advisors related to comments someone has posted about the student. So, even though I can return multiple recordsets, with a stored proc, am I breaking any of the concepts or best-practices of OOP? Thanks Mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
