If you have a table with 1000 rows and you return them all then you use up
network bandwidth (assuming Client/Server DB) and you use memory on the CF
server to store the results.
Using SELECT TOP is MUCH more efficient because it only returns what you
need.
Beware... I don't think SELECT TOP is supported on most DBs (although it's
been awhile since I've checked that one)...
+-----------------------------------------------+
Bryan Love
Macromedia Certified Professional
Internet Application Developer
Database Analyst
Telecommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+
"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
- Thomas Paine, The American Crisis
-----Original Message-----
From: Tyler Silcox [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 02, 2002 3:32 PM
To: CF-Talk
Subject: SELECT TOP n vs MaxRows...
A quickie: Is there any benefit to using SELECT TOP n vs using the MaxRows
attribute in cfquery?
Tyler Silcox
email | [EMAIL PROTECTED]
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
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