Mar 24, 2006 #1 daNewfie Programmer Joined Oct 14, 2004 Messages 258 Location CA using <cfoutput>#myQuery.Item1#</cfoutput> <cfoutput>#myQuery.Item2#</cfoutput> <cfoutput>#myQuery.Item3#</cfoutput> <cfoutput>#myQuery.Item4#</cfoutput> vs <cfoutput query="myQuery> #myQuery.Item1# #myQuery.Item2# #myQuery.Item3# #myQuery.Item4# </cfoutput>
using <cfoutput>#myQuery.Item1#</cfoutput> <cfoutput>#myQuery.Item2#</cfoutput> <cfoutput>#myQuery.Item3#</cfoutput> <cfoutput>#myQuery.Item4#</cfoutput> vs <cfoutput query="myQuery> #myQuery.Item1# #myQuery.Item2# #myQuery.Item3# #myQuery.Item4# </cfoutput>
Mar 24, 2006 #2 FALCONSEYE Programmer Joined Jul 30, 2004 Messages 1,158 Location US you can do <cfset myStart = GetTickCount()> <cfoutput>...</cfoutput> .... <cfset myStop = GetTickCount()> <cfset myTime = myStop - myStart> <cfoutput>#myTime#</cfoutput> <cfset myStart = GetTickCount()> <cfoutput query="myQuery> #myQuery.Item1# #myQuery.Item2# #myQuery.Item3# #myQuery.Item4# </cfoutput> <cfset myStop = GetTickCount()> <cfset myTime = myStop - myStart> <cfoutput>#myTime#</cfoutput> and see which one is faster. my quess is the second one is going to be faster ... hope it helps.. http://www.jetansolutions.com Upvote 0 Downvote
you can do <cfset myStart = GetTickCount()> <cfoutput>...</cfoutput> .... <cfset myStop = GetTickCount()> <cfset myTime = myStop - myStart> <cfoutput>#myTime#</cfoutput> <cfset myStart = GetTickCount()> <cfoutput query="myQuery> #myQuery.Item1# #myQuery.Item2# #myQuery.Item3# #myQuery.Item4# </cfoutput> <cfset myStop = GetTickCount()> <cfset myTime = myStop - myStart> <cfoutput>#myTime#</cfoutput> and see which one is faster. my quess is the second one is going to be faster ... hope it helps.. http://www.jetansolutions.com
Mar 24, 2006 #3 r937 Technical User Joined Jun 30, 2002 Messages 8,847 Location CA there's a huge difference! the first will print 4 values (from the current row of the query results) the second will print 4 values as many times as there are rows in the query results the only time it ever comes close is when the query returns only one row r937.com | rudy.ca Upvote 0 Downvote
there's a huge difference! the first will print 4 values (from the current row of the query results) the second will print 4 values as many times as there are rows in the query results the only time it ever comes close is when the query returns only one row r937.com | rudy.ca
Mar 24, 2006 #4 imstillatwork IS-IT--Management Joined Sep 26, 2001 Messages 1,605 Location US <cfset myStop = GetTickCount()> <cfset myTime = myStop - myStart> <cfoutput>#myTime#</cfoutput> Or <cfoutput>#GetTickCount() - mystart#</cfoutput> Just funny because I found myself doing all kinds of things like that the other day, and once was actually exactly this situation! Kevin http://www.lot-o-nothin.com/cfml/ Upvote 0 Downvote
<cfset myStop = GetTickCount()> <cfset myTime = myStop - myStart> <cfoutput>#myTime#</cfoutput> Or <cfoutput>#GetTickCount() - mystart#</cfoutput> Just funny because I found myself doing all kinds of things like that the other day, and once was actually exactly this situation! Kevin http://www.lot-o-nothin.com/cfml/