Did you add the 50,000 cffile writes? Or loop 50,000 times to create the
data in one variable, then do a single cffile write? Don't you have to
write to a file first, then perform the bulk insert on the file? I
imagine that would make a pretty major difference.
Steve Nelson
brobborb wrote:
> I did 2x 50,000 records insert: one using multiple inserts, the other
> by looping the query 50,000 times.
>
> 16 seconds vs 61 seconds, respectively.
>
> Forget the conditionals! Multiple Inserts yay!
>
> ----- Original Message -----
> From: Steve Nelson
> To: CF-Talk
> Sent: Monday, March 01, 2004 7:43 AM
> Subject: Re: SQL Multiple Inserts
>
> Just out of pure curiosity, can you try reducing the number of
> records
> until the processing time is about equivalent? Maybe we can figure
> out a
> very simple rule of thumb, like "If there are more than 100 records,
> use
> bulk insert, otherwise use a regular insert". Hell, it might be "if
> there are more than 2 records..." :-)
>
> Steve Nelson
>
> brobborb wrote:
>
> > I have just tested this myself and I am very happy!
> >
> > 308 milliseconds vs. 1590 milliseconds (the numbers were something
>
> > like that)
> >
> > This is alot of time saved since the actual application will do 10
>
> > times the amount of row inserts.
> >
> > ----- Original Message -----
> > From: Steve Nelson
> > To: CF-Talk
> > Sent: Monday, March 01, 2004 7:00 AM
> > Subject: Re: SQL Multiple Inserts
> >
> > I've often wonder at what point Bulk Insert becomes an
> advantage. I
> > imagine the drawback with bulk insert is that it has to read an
> > actual
> > file versus read from ram. It seems that for a small number of
> > records a
> > regular insert would be faster.
> >
> > Has anyone done any comparisons between bulk insert versus
> regular
> > insert?
> >
> > Steve Nelson
> >
> > "Robertson-Ravo, Neil (RX)" wrote:
> >
> > > Stored Procedure : BULK INSERT.
> > >
> > >
> > >
> > > _____
> > >
> > > From: brobborb [mailto:[EMAIL PROTECTED]
> > > Sent: 01 March 2004 12:16
> > > To: CF-Talk
> > > Subject: SOT: SQL Multiple Inserts
> > >
> > > 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?
> > >
> > > Thanks
> > > _____
> > >
> >
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- RE: SQL Multiple Inserts Robertson-Ravo, Neil (RX)
- Re: SQL Multiple Inserts Steve Nelson
- Re: SQL Multiple Inserts brobborb
- Re: SQL Multiple Inserts Steve Nelson
- Re: SQL Multiple Inserts brobborb
- Re: SQL Multiple Inserts Steve Nelson
- Re: SQL Multiple Inser... brobborb
- Re: SQL Multiple I... Steve Nelson
- Re: SQL Multiple I... brobborb
- RE: SQL Multiple I... Philip Arnold
- RE: SQL Multiple Inserts Philip Arnold
- Re: SQL Multiple Inserts brobborb
- Re: SQL Multiple Inserts brobborb
- RE: SQL Multiple Inserts Robertson-Ravo, Neil (RX)
- RE: SQL Multiple Inserts Robertson-Ravo, Neil (RX)
- Re: SQL Multiple Inserts brobborb