--============_-1238158479==_ma============
Content-Type: text/plain; charset="us-ascii" ; format="flowed"

On 11/11/00, pan penned:
>That's not true.
>The two selects you wrote will not prevent cachedwithin usage.
>There has to be a difference in sql that would produce different
>rows and/or columns.

Yes, it is true. Here's a test I ran to prove it. These 4 queries run 
right after one another on the same template. They are identical 
except for the layout.

<CFQUERY DATASOURCE="YouBuyGiftsSQL" NAME="getproducts" 
cachedwithin="#createtimespan(0,0,10,0)#">
SELECT product_id,product_name
FROM products
</CFQUERY>
<CFQUERY DATASOURCE="YouBuyGiftsSQL" NAME="getproducts" 
cachedwithin="#createtimespan(0,0,10,0)#">
SELECT product_id,product_name
FROM products
</CFQUERY>
<CFQUERY DATASOURCE="YouBuyGiftsSQL" NAME="getproducts" 
cachedwithin="#createtimespan(0,0,10,0)#">
SELECT product_id,product_name
FROM products
</CFQUERY>
<CFQUERY DATASOURCE="YouBuyGiftsSQL" NAME="getproducts" 
cachedwithin="#createtimespan(0,0,10,0)#">
SELECT product_id,product_name FROM products
</CFQUERY>

Here is the debug output. Notice the first one runs, gets cached for 
the next 2, then the last one queries the database again. It's 
quicker, but uncached nonetheless.


Queries

getproducts (Records=1815, Time=1247ms)
SQL =
SELECT product_id,product_name
FROM products

getproducts (Records=1815, Time=Cached Query)
SQL =
SELECT product_id,product_name
FROM products

getproducts (Records=1815, Time=Cached Query)
SQL =
SELECT product_id,product_name
FROM products

getproducts (Records=1815, Time=90ms)
SQL =
SELECT product_id,product_name FROM products
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
--============_-1238158479==_ma============
Content-Type: text/html; charset="us-ascii"

<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { margin-top: 0 ; margin-bottom: 0 }
 --></style><title>Re: [Cached Queries]</title></head><body>
<div>On 11/11/00, pan penned:</div>
<blockquote type="cite" cite>That's not true.<br>
The two selects you wrote will not prevent cachedwithin usage.<br>
There has to be a difference in sql that would produce
different</blockquote>
<blockquote type="cite" cite>rows and/or columns.</blockquote>
<div><br></div>
<div>Yes, it is true. Here's a test I ran to prove it. These 4
queries run right after one another on the same template. They are
identical except for the layout.</div>
<div><br></div>
<div><font size="-1">&lt;CFQUERY
DATASOURCE=&quot;YouBuyGiftsSQL&quot; NAME=&quot;getproducts&quot;
cachedwithin=&quot;#createtimespan(0,0,10,0)#<span
></span>&quot;&gt;<br>
SELECT product_id,product_name<br>
FROM products<br>
&lt;/CFQUERY&gt;<br>
&lt;CFQUERY DATASOURCE=&quot;YouBuyGiftsSQL&quot;
NAME=&quot;getproducts&quot;
cachedwithin=&quot;#createtimespan(0,0,10,0)#<span
></span>&quot;&gt;<br>
SELECT product_id,product_name<br>
FROM products<br>
&lt;/CFQUERY&gt;<br>
&lt;CFQUERY DATASOURCE=&quot;YouBuyGiftsSQL&quot;
NAME=&quot;getproducts&quot;
cachedwithin=&quot;#createtimespan(0,0,10,0)#<span
></span>&quot;&gt;<br>
SELECT product_id,product_name<br>
FROM products<br>
&lt;/CFQUERY&gt;<br>
&lt;CFQUERY DATASOURCE=&quot;YouBuyGiftsSQL&quot;
NAME=&quot;getproducts&quot;
cachedwithin=&quot;#createtimespan(0,0,10,0)#<span
></span>&quot;&gt;<br>
SELECT product_id,product_name FROM products</font></div>
<div><font size="-1">&lt;/CFQUERY&gt;</font></div>
<div><br></div>
<div>Here is the debug output. Notice the first one runs, gets cached
for the next 2, then the last one queries the database again. It's
quicker, but uncached nonetheless.</div>
<div><br></div>
<div><br>
<font size="-1">Queries<br>
<br>
getproducts (Records=1815, Time=1247ms)<br>
SQL =<br>
SELECT product_id,product_name<br>
FROM products<br>
<br>
getproducts (Records=1815, Time=Cached Query)<br>
SQL =<br>
SELECT product_id,product_name<br>
FROM products<br>
<br>
getproducts (Records=1815, Time=Cached Query)<br>
SQL =<br>
SELECT product_id,product_name<br>
FROM products<br>
<br>
getproducts (Records=1815, Time=90ms)<br>
SQL =</font></div>
<div><font size="-1">SELECT product_id,product_name FROM
products</font></div>

<div>-- <br>
<br>
Bud Schneehagen - Tropical Web Creations<br>
<br>
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/<br>
ColdFusion Solutions / eCommerce Development<br>
[EMAIL PROTECTED]<br>
http://www.twcreations.com/<br>
954.721.3452</div>
</body>
</html>
--============_-1238158479==_ma============--
------------------------------------------------------------------------------------------------
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