> > but if you want to do 50 small inserts in a row,
>
> "in a row"? Do you mean updates of one row of a table or subsequent
> inserts into a table?

I mean inserting 50 rows into a table or multiple tables in the same
database

> > 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

Say you've got an installation process for a new system or site, you
have to insert some standard copy (e.g. 50 rows), then it'd be a LOT
easier to have one CFQuery and insert all of the data in one go, if the
data is dynamic compared to some options, then you either run it in a
series of CFQuery's or you build it in a string (within CFScript) and
then have 1 CFQuery

The second option is preferable as you're only hitting the connector
once, waiting for one response and then carrying on while the database
server does the work

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"

Philip Arnold
Technical Director
Certified ColdFusion Developer
ASP Multimedia Limited
Switchboard: +44 (0)20 8680 8099
Fax: +44 (0)20 8686 7911

www.aspmedia.co.uk
www.aspevents.net

An ISO9001 registered company.

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to