Like Hamid Said, if the ColdFusion server has the query already in memory.
It doesn't need to send traffic to another server to get the information
again.  Most systems I've worked on have the db and the web server on
different areas of a firewall, so you're going through a lot of excess steps
if you're hitting the db every time for something that won't change.

Plus, you have a granular control on what is being cached.  The sql server
will only cache what it has room for.  So if enough queries are run against
it, the original query won't be cached anymore regardless.

But I think the original question was about a tree that took a long time to
create, and application variables would be a plus in this situation.....

Marlon
(another certified cf developer)

> -----Original Message-----
> From: Mark Charette [mailto:[EMAIL PROTECTED]
> Sent: Saturday, January 24, 2004 9:35 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] what PHP really needs
> 
> 
> > -----Original Message-----
> > From: Hamid Hossain [mailto:[EMAIL PROTECTED]
> > As a ColdFusion Certified Developer I can say: You are right!
> >
> > In CF you can fire a sql statment and store its result in a
> > variable which
> > is not going to be removed from the server's memory after
> > responding to the
> > user. That variable will be available for sometime declared by
> > you when you
> > created the query.
> 
> Perhaps you weren't aware that every modern database does the same thing
> (or
> can if you turn it on): the results of query sets are cached at the db
> server and are available if the same query is used without involving a
> file
> read. If any update changes any of the underlying result sets then the
> corresponding cache entry is invalidated and the momeory released for
> another cache entry.
> 
> Let the db server handle query/cache consistency ... why put yet another
> server in the way that will have to be triggered by the underlying db to
> clear ITS cache?
> 
> Mark C,
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to