Thank for your post Dick.

Unfortunately a lot of the stuff I'm doing I can't do in the stored 
procedures...  For various reasons, I'm developing on Access 2000, and will 
then port over to SQL Server before the site goes live.  I can call stored 
procedures in Access 2000, but they don't handle multiple commands.   Once 
I port to SQL Server I can put a lot of the additional processing into the 
stored procedures, but there is still work that I would have to do in the 
pages.   I definitely agree that the SQL engine will process the stored 
procedures faster, because it compiles most, if not all, of the stored 
procedure.   It's what to do when I get the recordset back that's puzzling 
me at the moment.  In order to be as efficient as possible.. should I use 
the QueryAddColumn function, and just add the additional fields.. then loop 
through that query a second time when I need to.. or should I create an 
array of structures when I first loop through the recordset, add the 
additional fields to it, and then loop through that when required?

Or am I just worrying needlessly over a microsecond or two!!? :^)



At 23:11 31/05/00 -0700, you wrote:
>If the "extra fields" are computed from other fields in the SQL query
>and/or external data (known at the time of the query), you might
>consider computing these fields as part of the SQL query itself...
>using scalar functions or T/SQL statements (SQL Server).
>
>  From what I have heard/read/experienced, the SQL engine can probably
>do this a lot more efficiently that any CF routines you could write.
>
>Dick
>
>
>At 10:10 AM +1000 6/1/2000, Nick Slay wrote:
> >ok... so when it comes to performance, it's better to use strutctures than
> >arrays and both of those are better than lists.  But what about
> >queries?   Queries that are generated using QueryNew as opposed to SQL
> >statements.
> >
> >I have a SQL Query result set that I need to loop through, calculate a
> >bunch of extra fields, and then store that off for looping through later.
> >
> >At the moment I create a new query, take the fields I want from the SQL
> >result set, and add them, plus the new fields into a new query.   There are
> >probably more efficient ways of doing this...
> >
> >Does anyone know whether creating another query, and looping through it
> >later is going to be better or worse than creating an array of structures
> >and looping through those instead?   For that matter would I be better to
> >add a column to the query that I got from SQL Server, and then loop through
> >that again?
> >
> >Thanks for any feedback!
>------------------------------------------------------------------------------
>Archives: http://www.eGroups.com/list/cf-talk
>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.eGroups.com/list/cf-talk
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