database - native 与 ODBC 数据库连接

标签 database r odbc

我知道某些数据库在 R 中具有原生支持(例如 MySQL),但您可以使用 RODBC 连接到其他数据库,例如 MS SQL Server。使用 native 驱动程序与 RODBC 相比,读取/写入速度提高了多少?还有哪些其他数据库在 R 中具有 native 驱动程序?一般来说,阅读比写作快还是慢?

最佳答案

如果您对 SQL Server 特别感兴趣,下面的引用资料有点过时了,但我想它可能仍然有效。

Using ODBC with Microsoft SQL Server

Performance of ODBC as a Native API

One of the persistent rumors about ODBC is that it is inherently slower than a native DBMS API. This reasoning is based on the assumption that ODBC drivers must be implemented as an extra layer over a native DBMS API, translating the ODBC statements coming from the application into the native DBMS API functions and SQL syntax. This translation effort adds extra processing compared with having the application call directly to the native API. This assumption is true for some ODBC drivers implemented over a native DBMS API, but the Microsoft SQL Server ODBC driver is not implemented this way.

The Microsoft SQL Server ODBC driver is a functional replacement of DB-Library. The SQL Server ODBC driver works with the underlying Net-Libraries in exactly the same manner as the DB-Library DLL. The Microsoft SQL Server ODBC driver has no dependence on the DB-Library DLL, and the driver will function correctly if DB-Library is not even present on the client.

Microsoft's testing has shown that the performance of ODBC-based and DB-Library–based SQL Server applications is roughly equal.

关于database - native 与 ODBC 数据库连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1169330/

相关文章:

R 项目组合

r - 如何在 R 中的多个可选键上加入 2 个数据帧,即(key1 或 Key2)其中一个或两个匹配

php - odbc_exec 与 odbc_excute

sql - 检索 ODBC 准备语句的 SQL 文本

mysql - 提交字符串中包含分号的数据库值?

Python3 cx-Oracle Oracle Client库无法加载: "libclntsh.so" on Linux

java - 模拟 JPA/Hibernate 数据库

r - 将 grid.arrange() 绘图保存到文件

MySQL ODBC 在 C# .NET 项目中失败,但在运行时编译的代码中失败

php - 数据库 | PHP |错误?