From: "Bud" <[EMAIL PROTECTED]>

Subject: Re: [Cached Queries]

[results of sql formatting changes on caching]

Interesting.
Before I replied that it wasn't true I also had run
the same type of test. As you can see from the debug
output (A) below the differently typed sql also
cached.

To test further and to allow for queries cached
within the current lifetime of the running server
I start/stopped and then got the debug results
in listing B.

B shows you were right, but also shows something
else. The first cachedwithin call after the intial
query did not produce cached results on a 
freshly restarted machine. That doesn't seem
correct unless there is some memory writing
procedure that is relatively slow in the 
cf administrative functions. I would think that
if caching is turned on, then the intial query would
be in memory at the time the query is performed.
Thus, any immediately following cachedwithin
call would read from the same memory segment.
It seems that there is finite time within which
the caching functions copy a query recordset
from some working segment to a different caching
memory segment.

I suppose it makes sense that cached queries are
apparently moved from a working memory segment
to a separate caching memory segment, but it does
make for a need to finely control the sequencing
from initial query to any subsequent cached calls.

Good discussion. Doe anyone else interpret the
differences between A & B as anything else than
memory segment handling?

As a final test to see if reformatted sql affects
caching I repeated A & B with the difference that 
afetr a restart I excluded the reformatted sql call
from the template but included it within B. Result
is that Bud is absolutely right. My mistake was that
I have a machine that almost never needs a restart. :)


Pan

[debug outpout A] 
[during an active server lifetime]

[intial query]
getURLs (Records=2553, Time=485ms)
SQL = 
select url_text
 from   URL
 where  0=0;

[first cachedwithin call]
getURLs (Records=2553, Time=Cached Query)
SQL = 
select url_text 
 from   URL
 where  0=0;

[second cahcedwithin call]
getURLs (Records=2553, Time=Cached Query)
SQL = 
select url_text 
 from   URL
 where  0=0;

[third cachedwithin call with sql reformat]
[first call with reformatted sql]
getURLs (Records=2553, Time=Cached Query)
SQL = 
select url_text from   URL
 where  0=0;

------------------------------------------------

[debug output B] 
[machine restarted]

[initial query]
getURLs (Records=2553, Time=581ms)
SQL = 
select url_text
 from   URL
 where  0=0;

[first cahcedwithin call]
getURLs (Records=2553, Time=478ms)
SQL = 
select url_text 
 from   URL
 where  0=0;

[second cachedwithin call]
getURLs (Records=2553, Time=Cached Query)
SQL = 
select url_text 
 from   URL
 where  0=0;

[third cachedwithin call but with sql reformatted]
getURLs (Records=2553, Time=457ms)
SQL = 
select url_text from   URL
 where  0=0;


Pan


------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to