Oracle: OLEDB Resource(Session) Poolingby Eric Ma EMa@ompus.jnj.comDatabase connectivity is a prerequisite for today's dynamically generated web pages. However, connection to databases is one of the most expensive operations one does from within an ASP page, because of the overhead involved in database user authentication and allocation of database resources to handle user interaction with the database, among other things. All these can add significant latency to your web site. Based on the recent discussions in this list, it is apparent that everyone is keenly aware of this issue and would like to minimize the negative impact on performance by having to connect to databases. For a programmer with a client/server programming background, it is natural for the person to design a solution based on using a database connection that persists through an entire user session. However, for a web-based application, this is a big no-no (see the article at /advice/dbsessionapp.aspfor reasons why you should never do this).The best practice for database connection (we limit our discussion to Oracle here) from an ASP application is to open the connection at late as you can, and close it as soon as you can, which means you open and close database connection on every ASP page. The encouraged practice is to use just one set of Oracle username/password for your entire application, not one set for each user as you may be used to do with client/server applications. Access control is no longer performed by the database, but by your application. You can save the ADO connection string in an application variable in the global.asa file. Some other alternatives include saving it in the windows Registry, or use an include file that has the ADO connection information, and include that file in the pages where database connection is required.Opening a new database connection for each ASP page may not be as bad as you think, because from ADO 2.0 up you can utilize the "resource (session) pooling" feature offered by Microsoft's OLE DB Provider for Oracle. Resource pooling is similar to ODBC connection pooling, where a connection is returned to a pool instead of being destroyed immediately after it is closed and set to nothing in your code. See the following article for more details:
OLEDB Resource(Session) Pooling (在Ado开发中使用连接池)
来源:互联网 发布日期:2016-01-14 11:16:06 浏览:1740次
相关内容
- 豪赌AI芯片!孙正义被曝筹资1000亿美元,要抗衡英伟达?
- M4芯片将专注于AI!苹果据称拟全面升级Mac产品线,股价涨超4%
- 三星组建 HBM 产能质量提升团队,加速 AI 推理芯片 Mach-2 开发
- 一颗改变了世界的芯片
- 英特尔突袭英伟达H100,新AI芯片训练快40%,推理快50%,CEO蹦迪庆祝
- 先台积电一步,三星已斩获首个 2nm 工艺芯片订单
- 硅谷大佬怎么看脑机接口技术?扎克伯格:我不会“第一个吃螃蟹”
- 仅1/8,“硅仙人”称不到1万亿美元就能重塑AI芯片领域
- 马斯克:首位脑机接口人类受试者或已康复,思考即可操控鼠标
- 可控核聚变公司MIFTI实现1500亿个中子产量,助力生产可持续清洁能源
AiLab云推荐
最新资讯
- 纳米缝合让复合材料更轻更坚韧
- Meta全新自研AI芯片曝光:性能相比MTIA v1提升了3倍!
- M4芯片将专注于AI!苹果据称拟全面升级Mac产品线,股价涨超4%
- 英特尔甩出全新AI训练芯片!跑千亿大模型速度超H200,罕见披露AI浮点性能
- 英特尔突袭英伟达H100,新AI芯片训练快40%,推理快50%,CEO蹦迪庆祝
- 对话东方晶源:打造中国芯片制造的GoldenFlow
- 一颗改变了世界的芯片
- 英特尔展示多模块芯片,预计为 Gaudi 3 人工智能加速器
- 台地震影响全球半导体格局?分析称可能会让供应链多元化呼声更强烈
- 三星 Exynos 2500 芯片再爆料:加码NPU芯片,构建更丰富 AI 体验
本月热点
热门排行
-
ChatGPT 设计了一款芯片
阅读量:196167
-
2023年全球风投额创5年最低,机构:今年会有更多创业公司倒闭
阅读量:195319
-
计算效率提升超60倍!中国公司杉数科技用GPU芯片开启运筹学新的“大航海时代”|钛媒体焦点
阅读量:191924
-
2023,AI创业者的50条反思
阅读量:102946
-
专访清华大学脑机接口科研团队负责人:中美“脑机接口”下一突破是什么?
阅读量:63437
-
2024,AI芯片之争加剧
阅读量:24135