Re: SQL Multiple Inserts

2004-03-01 Thread Steve Nelson
but would see a benefit from cfqueryparam ? > > Thanks, > Dave > >   - Original Message - >   From: Philip Arnold >   To: CF-Talk >   Sent: Monday, March 01, 2004 12:25 PM >   Subject: RE: SQL Multiple Inserts > >   > From: Hugo Ahlenius >   > >

RE: SQL Multiple Inserts

2004-03-01 Thread Philip Arnold
> From: David Fafard > > So of I use: > > select x,y,z from tbl where id=1 > select x,y,z from tbl where id=2 > select x,y,z from tbl where id=3 > > where id would be a dynamic variable, > I would not get any benefit in using cached query > but would see a benefit from cfqueryparam ? How many

Re: SQL Multiple Inserts

2004-03-01 Thread David Fafard
-   From: Philip Arnold   To: CF-Talk   Sent: Monday, March 01, 2004 12:25 PM   Subject: RE: SQL Multiple Inserts   > From: Hugo Ahlenius   >   > Cached queries means storing the whole output query variable   > in the cf server memory. CF does not touch the database. The   > query c

RE: SQL Multiple Inserts

2004-03-01 Thread Philip Arnold
> From: Hugo Ahlenius > > Cached queries means storing the whole output query variable > in the cf server memory. CF does not touch the database. The > query can not have any dynamic variables (The SQL statement > has to be the same). > > Using cfqueryparam improves the caching on the db serve

Re: SQL Multiple Inserts

2004-03-01 Thread Jochem van Dieten
David Fafard wrote: > > Again.. because one can NOT use cached queries with cfqueryparam http://www.macromedia.com/go/wish/ > which is more beneficial, cached queries or cfqueryparam ? Depends on the situation. > I have always been confused with this distinction. > Is there any good "rules of

RE: SQL Multiple Inserts

2004-03-01 Thread Hugo Ahlenius
[mailto:[EMAIL PROTECTED] | Sent: Monday, March 01, 2004 17:23 | To: CF-Talk | Subject: Re: SQL Multiple Inserts | | Interesting. | | Again.. because one can NOT use cached queries with | cfqueryparam, which is more beneficial, cached queries or | cfqueryparam ? | | I have always been confused with this

Re: SQL Multiple Inserts

2004-03-01 Thread David Fafard
--   From: Mark A. Kruger - CFG   To: CF-Talk   Sent: Monday, March 01, 2004 10:34 AM   Subject: RE: SQL Multiple Inserts   Stored procedures are not cached queries - they are compiled execution plans. The thing that makes the difference is the   databinding. SQL knows what type a variable i

RE: SQL Multiple Inserts

2004-03-01 Thread Hugo Ahlenius
w.grida.no - | -Original Message- | From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED] | Sent: Monday, March 01, 2004 16:35 | To: CF-Talk | Subject: RE: SQL Multiple Inserts | | Stored procedures are not cached queries - they are compiled | execution plans. The thing that makes the

RE: SQL Multiple Inserts

2004-03-01 Thread Mark A. Kruger - CFG
on plan in the cache. -Mark   -Original Message-   From: brobborb [mailto:[EMAIL PROTECTED]   Sent: Monday, March 01, 2004 7:47 AM   To: CF-Talk   Subject: Re: SQL Multiple Inserts   But will it help in terms of performance? My understanding is that Stored Procedures are cached queries.  But

RE: SQL Multiple Inserts

2004-03-01 Thread Philip Arnold
> From: brobborb > > Something like > > > > > INSERT INTO testy (name, a, b, c, d, e, f, g) VALUES > ('#name#', 'other stuff', 'a', 'a', 'a', 'a', 'a', 'a') > > > > > The problem is that even though the query goes through and > the page gets processed, SQL Server only actually accepts

Re: SQL Multiple Inserts

2004-03-01 Thread brobborb
sed, SQL Server only actually accepts 456 rows!  So I will try using your syntax :)     - Original Message -   From: Steve Nelson   To: CF-Talk   Sent: Monday, March 01, 2004 8:15 AM   Subject: Re: SQL Multiple Inserts   Hmmm, maybe. I haven't used bulk insert in a couple years

Re: SQL Multiple Inserts

2004-03-01 Thread Steve Nelson
ile or anything.  Or are you talking about > something else? >   - Original Message - >   From: Steve Nelson >   To: CF-Talk >   Sent: Monday, March 01, 2004 8:02 AM >   Subject: Re: SQL Multiple Inserts > >   Did you add the 50,000 cffile writes? Or loop 50,000 times to c

Re: SQL Multiple Inserts (LIMIT)

2004-03-01 Thread brobborb
01, 2004 7:43 AM   Subject: Re: SQL Multiple Inserts   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 doi

Re: SQL Multiple Inserts

2004-03-01 Thread brobborb
onday, March 01, 2004 8:02 AM   Subject: Re: SQL Multiple Inserts   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

Re: SQL Multiple Inserts

2004-03-01 Thread 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 thum

Re: SQL Multiple Inserts

2004-03-01 Thread brobborb
Hey question.  When you do an INSERT statement, does SQL still return a resultset?  Or does that only happen with SELECT statements?   - Original Message -   From: Philip Arnold   To: CF-Talk   Sent: Monday, March 01, 2004 7:28 AM   Subject: RE: SQL Multiple Inserts   > From: Robert

RE: SQL Multiple Inserts

2004-03-01 Thread Robertson-Ravo, Neil (RX)
In theory an SP should be faster no matter...    _   From: brobborb [mailto:[EMAIL PROTECTED] Sent: 01 March 2004 13:47 To: CF-Talk Subject: Re: SQL Multiple Inserts But will it help in terms of performance? My understanding is that Stored Procedures are cached queries.  But if the query

Re: SQL Multiple Inserts

2004-03-01 Thread brobborb
: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

Re: SQL Multiple Inserts

2004-03-01 Thread brobborb
tored procedure for this part!!   - Original Message -   From: Robertson-Ravo, Neil (RX)   To: CF-Talk   Sent: Monday, March 01, 2004 7:34 AM   Subject: RE: SQL Multiple Inserts   No, thats the whole point of a stored procedure...you pass it in variables   and it does the proce

Re: SQL Multiple Inserts

2004-03-01 Thread Steve Nelson
o 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.

Re: SQL Multiple Inserts

2004-03-01 Thread brobborb
0,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 c

RE: SQL Multiple Inserts

2004-03-01 Thread Robertson-Ravo, Neil (RX)
No, thats the whole point of a stored procedure...you pass it in variables and it does the processing    _   From: brobborb [mailto:[EMAIL PROTECTED] Sent: 01 March 2004 13:32 To: CF-Talk Subject: Re: SQL Multiple Inserts Here's what i thought about stored procedure.  I thought

RE: SQL Multiple Inserts

2004-03-01 Thread Robertson-Ravo, Neil (RX)
True, true.also Bulk Inserts are not entered into the Transaction Logif on MSSQL    _   From: Philip Arnold [mailto:[EMAIL PROTECTED] Sent: 01 March 2004 13:28 To: CF-Talk Subject: RE: SQL Multiple Inserts > From: Robertson-Ravo, Neil (RX) > > Stored Procedure : BU

Re: SQL Multiple Inserts

2004-03-01 Thread brobborb
-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 reco

Re: SQL Multiple Inserts

2004-03-01 Thread brobborb
entially a different query every time. Is this correct?  My queries are like the latter.   - Original Message -   From: Robertson-Ravo, Neil (RX)   To: CF-Talk   Sent: Monday, March 01, 2004 6:14 AM   Subject: RE: SQL Multiple Inserts   Stored Procedure : BULK INSERT.  _

RE: SQL Multiple Inserts

2004-03-01 Thread Philip Arnold
> From: Robertson-Ravo, Neil (RX) > > Stored Procedure : BULK INSERT. This really depends - if you're inserting data from another table, then it's a lot easier to do a INSERT INTO SELECT FROM Also, if he's running Access *spit* then doing SPs is impossible [Todays Threads] [This Message] [

RE: SQL Multiple Inserts

2004-03-01 Thread Philip Arnold
> 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

Re: SQL Multiple Inserts

2004-03-01 Thread Steve Nelson
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 ve

RE: SQL Multiple Inserts

2004-03-01 Thread Robertson-Ravo, Neil (RX)
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 al