Philip Arnold - ASP wrote:

> >>sending those requests as separate CFQuery tags is pretty
> >>much insane - building one big TSQL statement with one hit
> >>to the database server
> >>is a much better solution
> >
> >Why would that be insane?
>
> Basically as you're "blitzing" the connector, whether it's ODBC or
> OLE-DB - doing 50 queries immediately after each other is a major
> resource drain

Connection pooling?

> In it's way, it's rather like using INSERT INTO () SELECT FROM instead
> of looping over a query and inserting the rows one at a time - it 
> saves on server access, resources and thus keeps your server running 
> "at speed"

I would agree most of the time it is preferable. But that does not 
necessarily mean doing the separate cfqueries is insane.


And besides, I would still implement it without depending on TSQL:

<cfquery datasource="test">
   <cfloop from="1" to="3" index="i">
     INSERT INTO test (testID)
     VALUEs (<cfqueryparam cfsqltype="cf_sql_integer" value="#i#">);
   </cfloop>
</cfquery>

One database connection, not database dependent. Best of both worlds :)

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to