Really?  There's a limit?  What is it?  hmmm.  Me sets loop to 50,000........ :D

it took it!  16203 milliseconds!

however, at 100,000 inserts, it took 57333 milliseconds.  Maybe cos mys erver is crapping out.  It seems like doing 2x 50,000 inserts is alot faster than 1 100,000 inserts!

50,000 should be more than enuff!


  ----- Original Message -----
  From: Philip Arnold
  To: CF-Talk
  Sent: Monday, March 01, 2004 7:12 AM
  Subject: RE: SQL Multiple Inserts

  > From: brobborb
  >
  > Hey guys, let's say I have to insert like 5,000 rows of data
  > with the click of a button in my app.  Would it be alot
  > faster to insert all 5,000 in one CFQuery with multiple
  > inserts?  Right now it is just one query looped 5,000 times.
  >
  > Also are there any drawbacks with using multplie inserts?

  I've not tested with JDBC, but with ODBC there is a limit to how much
  you can pass to the SQL engine in one go

  But in answer to your question - it's a LOT quicker to do it in less
  CFQUERY tags as you're passing the load to the database and letting it
  do it's job rather than saying "Here is one item, here is another, and
  another"

  Where are the inserts coming from? If they're from another table, then
  you should look at letting the database handle the inserts the best way
  it can

  You've also not said which DB Engine
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to