I believe the first example would be less of a load on the DB and CF. The first example tells the database using SQL to only return the top 1 row.
The second example tells the database to SELECT ALL rows, then CF only outputs 1. Both will return the same results though. ______________________ steve oliver cresco technologies, inc. http://www.crescotech.com -----Original Message----- From: Teng-Yan Loke [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 20, 2002 9:42 PM To: CF-Talk Subject: RE: Retrieving most recent record from db > <CFQuery = "q_results> > SELECT Top 1 * FROM T_EMAIL > ORDER BY Eid DESC > </CFQUERY> Assuming this has the same output as: <cfquery query="q_results" maxrows="1"> select * from t_email order by eid desc </cfquery> Will the former example yield less load from the DB server than the latter? ---- Teng-Yan Loke | [EMAIL PROTECTED] Developer | novaSPRINT Systems Pte Ltd tel: +65-2169727 | fax: +65-3390279 ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

