--=====================_14379924==_.ALT
Content-Type: text/plain; charset="us-ascii"

Exactly why I say to NOT use MAXROWS on the query, but use STARTROW and NUMROWS on the 
CFOUTPUT QUERY=

At 08:19 AM 8/3/00 -0700, David Green wrote:
>I am new to SQL and CF but with this command how do I get the next 50
>records.  51 thru 100 display.
>
>> It's a lot quicker (and smoother) to use the SQL command TOP, i.e.;
>> select top 50 *
>> from myTable
>> where myField='#myValue#'
>
>Thanks for help
>David
>
>----- Original Message -----
>From: "Philip Arnold - ASP" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, August 03, 2000 7:25 AM
>Subject: RE: Paging query results
>
>
>> > No, I'm pretty sure that is incorrect.
>> > Using MAXROWS on the Query will limit the number of rows
>> > retrieved from the database, which will cut off the list of
>> > results. Queries do not have a STARTROW.
>> >
>> > To show a page at a time I must use STARTROW and MAXROWS on the
>> > <CFOUTPUT QUERY=xxx>
>>
>> CFQuery can't take StartRow, but does have MaxRows
>>
>> There is one flaw with this method though - the whole SQL query is parsed
>> and the number of rows is returned to CF which then only sends the
>template
>> the number the rows
>>
>> It's a lot quicker (and smoother) to use the SQL command TOP, i.e.;
>> select top 50 *
>> from myTable
>> where myField='#myValue#'
>>
>> One way I handle this is to have a list of IDs that I pass from page to
>> page, and then pass the start position, then build a smaller list of
>entries
>> from this list for the CFQuery
>>
>> This not only reduces the work the SQL has to do, but it also speeds up
>the
>> results to the template
>>
>> Philip Arnold
>> ASP Multimedia Limited
>> T: +44 (0)20 8680 1133
>>
>> "Websites for the real world"
>>
>> **********************************************************************
>> This email and any files transmitted with it are confidential and
>> intended solely for the use of the individual or entity to whom they
>> are addressed. If you have received this email in error please notify
>> the system manager.
>> **********************************************************************
>>
>>
>> --------------------------------------------------------------------------
>----
>> 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.
>
>------------------------------------------------------------------------------
>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. 


---------------------------------------------------------------------------
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 Fax 1.212.679.8032

--=====================_14379924==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
<font size=3>Exactly why I say to NOT use MAXROWS on the query, but use
STARTROW and NUMROWS on the CFOUTPUT QUERY=<br>
<br>
At 08:19 AM 8/3/00 -0700, David Green wrote:<br>
<blockquote type=cite cite>I am new to SQL and CF but with this command
how do I get the next 50<br>
records.&nbsp; 51 thru 100 display.<br>
<br>
&gt; It's a lot quicker (and smoother) to use the SQL command TOP,
i.e.;<br>
&gt; select top 50 *<br>
&gt; from myTable<br>
&gt; where myField='#myValue#'<br>
<br>
Thanks for help<br>
David<br>
<br>
----- Original Message -----<br>
From: &quot;Philip Arnold - ASP&quot; &lt;[EMAIL PROTECTED]&gt;<br>
To: &lt;[EMAIL PROTECTED]&gt;<br>
Sent: Thursday, August 03, 2000 7:25 AM<br>
Subject: RE: Paging query results<br>
<br>
<br>
&gt; &gt; No, I'm pretty sure that is incorrect.<br>
&gt; &gt; Using MAXROWS on the Query will limit the number of rows<br>
&gt; &gt; retrieved from the database, which will cut off the list
of<br>
&gt; &gt; results. Queries do not have a STARTROW.<br>
&gt; &gt;<br>
&gt; &gt; To show a page at a time I must use STARTROW and MAXROWS on
the<br>
&gt; &gt; &lt;CFOUTPUT QUERY=xxx&gt;<br>
&gt;<br>
&gt; CFQuery can't take StartRow, but does have MaxRows<br>
&gt;<br>
&gt; There is one flaw with this method though - the whole SQL query is
parsed<br>
&gt; and the number of rows is returned to CF which then only sends
the<br>
template<br>
&gt; the number the rows<br>
&gt;<br>
&gt; It's a lot quicker (and smoother) to use the SQL command TOP,
i.e.;<br>
&gt; select top 50 *<br>
&gt; from myTable<br>
&gt; where myField='#myValue#'<br>
&gt;<br>
&gt; One way I handle this is to have a list of IDs that I pass from page
to<br>
&gt; page, and then pass the start position, then build a smaller list
of<br>
entries<br>
&gt; from this list for the CFQuery<br>
&gt;<br>
&gt; This not only reduces the work the SQL has to do, but it also speeds
up<br>
the<br>
&gt; results to the template<br>
&gt;<br>
&gt; Philip Arnold<br>
&gt; ASP Multimedia Limited<br>
&gt; T: +44 (0)20 8680 1133<br>
&gt;<br>
&gt; &quot;Websites for the real world&quot;<br>
&gt;<br>
&gt;
**********************************************************************<br>
&gt; This email and any files transmitted with it are confidential
and<br>
&gt; intended solely for the use of the individual or entity to whom
they<br>
&gt; are addressed. If you have received this email in error please
notify<br>
&gt; the system manager.<br>
&gt;
**********************************************************************<br>
&gt;<br>
&gt;<br>
&gt;
--------------------------------------------------------------------------<br>
----<br>
&gt; Archives:
<a href="http://www.mail-archive.com/[email protected]/" 
eudora="autourl">http://www.mail-archive.com/[email protected]/</a><br>
&gt; To Unsubscribe visit<br>
<a href="http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/cf_talk" 
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/cf_talk</a>
or<br>
send a message to [EMAIL PROTECTED] with 'unsubscribe' in<br>
the body.<br>
<br>
------------------------------------------------------------------------------<br>
Archives: <a href="http://www.mail-archive.com/[email protected]/" 
eudora="autourl">http://www.mail-archive.com/[email protected]/</a><br>
To Unsubscribe visit <a 
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/cf_talk" 
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/cf_talk</a>
 or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the 
body. </font></blockquote><br>

<font size=2><b><br>
---------------------------------------------------------------------------<br>
Peter Theobald, </b>Chief Technology Officer<br>
</font><font size=3 color="#0000FF"><b>LiquidStreaming </b></font><a 
href="http://www.liquidstreaming.com/" eudora="autourl"><font size=2 
color="#0000FF"><u>http://www.liquidstreaming.com</a><br>
</u></font><font size=2>[EMAIL PROTECTED]<br>
<b>Phone</b> 1.212.545.1232 <b>Fax</b> 1.212.679.8032<br>
</font></html>

--=====================_14379924==_.ALT--

------------------------------------------------------------------------------
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.

Reply via email to