I'll have to double check this... but I believe recent versions of CF (as of MX perhaps?) do -not- pull down the whole resultset.
If this is the case (and I stress -if-...), then I'd say that using maxrows would be preferrable as it'd make your applications more portable across different databases. On 6/11/07, Russ <[EMAIL PROTECTED]> wrote: > I believe if you specify maxrows="10" it will pull down the whole resultset > and then only grab the first 10 rows. Similar to doing <cfoutput > query="queryName" maxrows="10"> > > Using Top/Limit is preferable. > > Russ > > > > -----Original Message----- > > From: Will Tomlinson [mailto:[EMAIL PROTECTED] > > Sent: Monday, June 11, 2007 1:37 PM > > To: CF-Talk > > Subject: Performance advantage - LIMIT VS. maxrows? > > > > MX7 / MySQL 5. > > > > I need to query a large table of data, but only want to pull the top 10 > > rows or so. > > > > Is there an advantage to using LIMIT 10 in the query, over <cfquery > > maxrows="10">? > > > > Or vice versa? > > > > Thanks, > > Will > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280681 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4