OK, gonna jump in on this one now.
I don't use cached queries. I use scoped queries. Essentially the same
thing, but I like managing my own caching rather than allowing the server
to determine what gets cached (based on the rotating list of "last used").
Just a preference.
But on the queries vs. structures discussion you're comparing apples and
oranges. If you have data that you're going to loop over and output, use a
query. That's what they're designed for. But if you're going to call
individual pieces of data (particularly organizationally nested pieces of
data) than use a structure, much quicker to point to exactly what you want
than to loop to find it.
Example, a structure that holds school information:
schools.schoolname.class.teacher = "[teachername]"
In my code (where I know the school and class):
#schools[schoolname][class]["teacher"]# will output teacher name.
I can pull this information out of a resident structure much quicker than
running a query, or even looping through a query to find the information I
want. This may not be the best example, but it may help to look at some of
the queries you're running to get complex information and see where a
nested structure (queried for and built once) saved into application scope
(then copied to request scope with cflock for usage) might be a better
alternative.
I *love* structures and I'm open to any questions on using them efficiently.
Sharon
P.S., <cfscript> rules for working with structures, whether it's faster or not.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.