agstudy / rsqlserver

Sql Server driver database interface (DBI) driver for R. This is a DBI-compliant Sql Server driver based on the System.Data.SqlClient.
82 stars 30 forks source link

Is there any way to change the timeout (ie DataContext.CommandTimeout in .net)? #10

Closed the-tourist- closed 9 years ago

the-tourist- commented 9 years ago

One big reason to mix sql server and R is that sql server can be used to store, normalise and query larger amounts of data. I am trying to download several million rows of 80 column data from a single table into R for processing. Unfortunately, even with a pretty fast ssd based array this always times out after the first few hundred thousand rows. Does a proxy for DataContext.CommandTimeout exist in RSqlServer? If not could it be added?

agstudy commented 9 years ago

Do you mean adding a timeout to the command? This can be added but I should check that I still b a DBI compliant since this feature is special for SQL server command object.

the-tourist- commented 9 years ago

It could probably be added as a passthrough variable to dbConnect or the sendQuery functions and remain DBI compliant.

On Sat, Dec 13, 2014 at 8:13 PM, agstudy notifications@github.com wrote:

Do you mean adding a timeout to the command? This can be added but I should check that I still b a DBI compliant since this feature is special for SQL server command object.

— Reply to this email directly or view it on GitHub https://github.com/agstudy/rsqlserver/issues/10#issuecomment-66887342.

agstudy commented 9 years ago

You can see the an example of setting time out in unit tests.

  dbSendQuery(conn, query,timeout=90)

or

  dbGetQuery(conn, query,timeout=90)