Oracle 10g 的结果缓存
我读到 Oracle 11g 有结果缓存功能,我可以真正从中受益。然而,我的客户有Oracle 10g。是否有任何明智的方法可以在由 PHP/5.2 提供支持的 Web 应用程序中模拟它,该应用程序通过 ODBC 连接到远程 Oracle 10g 服务器(使用 Oracle 的驱动程序,而不是 Microsoft 的驱动程序)。
这个想法是在通常返回小数据集的大型表上缓存复杂的查询,并确保当基础表发生更改时缓存的数据被丢弃(不需要立即发生,一小时的延迟是可以接受的)。
我可以在 Web 服务器(不是 Oracle 服务器)上安装新软件,并且如果需要的话我可以切换到 OCI8。
I've read that Oracle 11g has a results cache feature and I could really benefit from it. However, my client has Oracle 10g. Is there any sensible way to emulate it in a web application powered by PHP/5.2 that connects to a remote Oracle 10g server via ODBC (with Oracle's driver, not Microsoft's).
The idea is to cache complex queries on large tables that normally return small data sets and make sure that cached data gets discarded when the underlying tables changes (it doesn't need to be immediate, a one hour delay is acceptable).
I can install new software on the web server (not the Oracle server) and I could probably switch to OCI8 if necessary.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用 容忍陈旧。
You could look at materialized views in the database with stale tolerated.
memcached 是一个选项。
但您的客户需要升级到 11g,因为 10g 支持将于 2011 年 7 月 31 日结束,他们可以购买延长支持直至 2013 年 7 月 31 日。 (此信息可能已更改)
memcached is an option.
But your client needs to upgrade to 11g since 10g support ends on 31-Jul-2011, they could purcase extended support until 31-Jul-2013. (this info could have changed)
您可以使用 11gR2 的内存数据库缓存选项。它也适用于 10.2.0.4。这是 TimesTen 收购的副产品,您可以使用它在应用程序服务器上定义直写式缓存。这可以实现非常快的回报。它的扩展性非常好,将应用程序服务器与缓存网格服务器结合起来。在您的情况下,如果要扫描的数据集很大,那么使用 mviews 可能会很好。如果它很复杂,即使对于不断修改的表,缓存也会正常工作。
You could use the In Memory Database Cache option of 11gR2. It also works for 10.2.0.4. This is a spin off from the TimesTen aquisition and you can use it to define a write through cache on your application servers. This allows for very fast returns. It scales wonderfully well, combine the app servers with the cache grid servers. In your case it could be fine to use mviews, if the data set to be scanned is large. If it is just complex, the cache will work fine, even for tables that are constantly modified.