[R] "as.is" for dbGetQuery?
Jim Porzak
jporzak at gmail.com
Wed Sep 2 19:52:38 CEST 2009
Hello,
I'm using RJDBC/DBI to query a MS SQL DB that looks like:
YMDHMs Num1stsAboveBaseline
2009-05-18 00:00 1
2009-05-18 00:01 2
2009-05-18 00:02 2
...
The first column will get converted to POSIXct.
However, dbGetQuery converts the first column to a factor - which
kills performance when I go against a production table with a few 100k
rows.
Using read.table() against the equivalent text file allows me to say
"as.is = 1" resulting in characters.
I don't see any equivalent in dbGetQuery (nor in dbSetQuery & fetch)
What am I missing?
TIA,
Jim Porzak
Ancestry.com
San Francisco, CA
www.linkedin.com/in/jimporzak
use R! Group SF: www.meetup.com/R-Users/
More information about the R-help
mailing list