R: Painfully slow read performance using RODBC & SQL Server

前端 未结 2 2056
执笔经年
执笔经年 2021-01-31 05:56

I am new to R but am interested in using Shiny to create dynamic charts using data stored in a SQL Server database. To enable interactivity, I want to bring in the raw data fro

2条回答
  •  渐次进展
    2021-01-31 06:15

    I would make sure that your R timezone - sys.setenv(TZ='GMT') set to GMT for example - is same as the time zone of the SQL server from where you are pulling data. It could be that the date column is taking a long time to be interpreted especially if it has a timestamp.

    RJDBC will run quicker because it converts date to character and everything else to numeric. RODBC will try to preserve the data type of the SQL table.

提交回复
热议问题