Why is Oracle OCI a better API for a scalable, multi-threaded application than Open Database Connectivity (ODBC) ?
来源:互联网 发布:人工智能机器人是什么 编辑:程序博客网 时间:2024/05/17 23:35
Why is Oracle OCI a better API for a scalable, multi-threaded application than Open Database Connectivity (ODBC) ?
The only advantage of ODBC is that it is practically vendor neutral. However, this vendor neutrality reduces the flexibility that a native interface such as OCI allows.
ODBC is a "least common denominator" interface and limits a scalable, high performance architecture.
Oracle8i OCI is a much better choice than ODBC for the following reasons:
OCI is optimized for queries. Transparent prefetch buffers reduce round-trips and improve performance and scalability. As a result, there is reduced memory usage on the server.
OCI is optimized for round-trips. No-reply requests are batched until the next call is generated for the server. This allows certain calls to be lazily propagated.
OCI is thread safe. You do not need to mutex (use mutual exclusivity locks) any of the OCI handles. ODBC is not thread safe, so you have to mutex most data structures.
OCI provides an asynchronous event notification API for active databases.
OCI provides enhanced array data manipulation language (DML) operations that reduce round-trips.
OCI returns ROWIDs for all rows selected for update in a single round-trip. Using ROWID allows for more efficient SQL access.
ODBC has no concept of sessions. OCI decouples connections, sessions and transactions. Multiple users can use a single connection; they get serialized on the connection for SQL operations. Multiple transactions can exist per user. This allows users to scale and service more users than there are connections available. Sessions and transactions can be migrated between connections to the same server.
ODBC does not support object types, large objects (LOBs), and other new Oracle datatypes.
ODBC affects server scalability. Using ODBC and having n number of concurrent users forces the server to have n number of processes service the clients if Oracle8i is operating in dedicated server mode. Your operating system may or may not support so many connections and processes.
ODBC is a wrapper around OCI so it is slower.
Note: Some of these comments may or may not be applicable to your particular application. For example, if an application invocation is always dedicated for a user, then sessions, transactions, multiplexing, and multi-threading are not issues.
Modified: 23-JUL-02 Ref #: ID-2329
- Why is Oracle OCI a better API for a scalable, multi-threaded application than Open Database Connectivity (ODBC) ?
- Why SAP HANA is a Better Choice than Oracle Exalytics
- Open Database Connectivity,ODBC
- Why ConcurrentHashMap is better than Hashtable and just as good as a HashMap
- Why MySQL replication is better than mysqlbinlog for recovery
- ODBC-Open Database Connectivity开放数据库互连
- Why Git is Better than X
- Why Git is Better than X
- Why Git is better than SVN
- Why is ARKit better than the alternatives?
- why not better than her for English?
- Why character array is better than String for Storing password in Java
- Implements a multi-threaded Web proxy server
- Why It’s Better to Text Than Call in a Mass Emergency
- Miser–A Dynamically Loadable Memory Allocator for Multi-Threaded Applications
- 30. A good fame is better than a good face. 美名胜于美貌
- 7 Reasons Why BSD Is Better than Linux
- The ODBC resource dll is a different version than the ODBC setup dll
- ASP.NET刷新页面的六种方法
- PostgreSQL 数据库扩展的三种方式
- CPU主频认识
- Tuxedo的配置管理简要说明
- asp版VML折线图
- Why is Oracle OCI a better API for a scalable, multi-threaded application than Open Database Connectivity (ODBC) ?
- Ant拷贝文件夹
- 摩托罗拉失落的十年
- 如何加快 Java Applet程序的下载时间
- 关于在批处理中如何获取当前目录
- apache+php 字符编码问题解决
- 少走弯路的十条忠告
- PB调用带参存储过程:请教
- c++ builder 中ShellExecute函数的用法