DB connection through DBI is too slow for large DB



If I try to connect to a large Oracle database using DBI package.

con <- dbConnect(odbc::odbc(), "ORACLE")

In R terminal, a connection is established instantly. But in RStudio with new “Connections” pane added, it takes several minutes. I guess the reason is that RStudio is trying to download a list of schema from the server, which appears on the “Connections” pane. This is unnecessary and I want to disable it.

Is there a way to close “Connections” pane or to disable the automatic schema downloading at the beginning?


Hi @jmmm, would you mind opening an GitHub issue for this in the odbc package’s repo? This is something that has been reported to us via various sources, and have recently discussed with @jimhester and @nathan. Thanks!


Hi @edgararuiz, thanks for your reply. Unfortunately, I don’t understand the technical details well enough (had no clue that it was caused by odbc package) to open the issue. Hoping that it can be fixed soon because the new SQL markdown is really useful to streamline the interaction between DB and R. Thanks a lot for that!


No problem, I’ll go ahead and open the issue


The way to do this currently is to set connectionObserver option to NULL in your RStudio session. This will disable all connections to the connections pane.

options(connectionObserver = NULL)