[R] RODBC sqlQuery insert slow

2006-10-13 Thread Bill Szkotnicki
Hello, I am trying to insert a lot of data into a table using windows R (2.3.1) and a mysql database via RODBC. First I read a file with read.csv and then form sql insert statements for each row and execute the insert query one row at a time. See the loop below. This turns out to be very slow.

Re: [R] RODBC sqlQuery insert slow

2006-10-13 Thread Jerome Asselin
On Fri, 2006-10-13 at 09:09 -0400, Bill Szkotnicki wrote: Hello, I am trying to insert a lot of data into a table using windows R (2.3.1) and a mysql database via RODBC. First I read a file with read.csv and then form sql insert statements for each row and execute the insert query one row

Re: [R] RODBC sqlQuery insert slow

2006-10-13 Thread ONKELINX, Thierry
, a surgery of suppositions. ~M.J.Moroney -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Bill Szkotnicki Verzonden: vrijdag 13 oktober 2006 15:09 Aan: [EMAIL PROTECTED] Onderwerp: [R] RODBC sqlQuery insert slow Hello, I am trying to insert a lot of data

Re: [R] RODBC sqlQuery insert slow

2006-10-13 Thread Armstrong, Whit
To: [EMAIL PROTECTED] Subject: [R] RODBC sqlQuery insert slow Hello, I am trying to insert a lot of data into a table using windows R (2.3.1) and a mysql database via RODBC. First I read a file with read.csv and then form sql insert statements for each row and execute the insert query one row

Re: [R] RODBC sqlQuery insert slow

2006-10-13 Thread Michel Lang
I am trying to insert a lot of data into a table using windows R (2.3.1) and a mysql database via RODBC. First I read a file with read.csv and then form sql insert statements for each row and execute the insert query one row at a time. See the loop below. This turns out to be very slow. Can

Re: [R] RODBC sqlQuery insert slow

2006-10-13 Thread Bill Szkotnicki
Thanks for the help ... the sqlSave() function was the solution. The lesson, which has been stated many times before, is to avoid loops wherever possible! Bill # fast RODBC inserting dat - cbind(as.character(strptime(ti[,2],%d/%m/%y %H:%M:%S %p)),ti[,3:12]) # you need the as.character to make