Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

62

积分

0

好友

8

主题
1#
发表于 2012-1-31 16:09:03 | 查看: 5290| 回复: 2
看Maclean的v$open_cursor文章有些地方没看懂,通过java程序执行了1000多次同一个语句,为何这个cursor没有成为session_cached_cursor,那什么情况下cursor会成为pga中的 session_cached_cursor呢?
Maclean文章http://www.oracledatabase12g.com/archives/about-dynamic-view-open_cursor.html
2#
发表于 2012-1-31 22:07:06
ODM Data:

SESSION_CACHED_CURSORS  will cause closed cursors to be cached within the session so that a subsequent call to parse the statement will bypass the parse phase. This is similar to HOLD_CURSORS in the precompilers. One point to be careful about is that if this parameter is set to a high value, the amount of fragmentation in the shared pool may be increased. Another thing to note is that if the value of this parameter is less than the cursors that are closed before the first one is reopened, you will never see the benefit of the cache since the first cursor would have been aged out already.

As maclean said:

A cursor should be either an open cursor or session cached cursor , not both

After you have closed the cursor , it may become  session cached cursor , If it satisfied the requirement  .

回复 只看该作者 道具 举报

3#
发表于 2012-2-1 14:14:02
received with thanks!

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-23 19:56 , Processed in 0.046486 second(s), 22 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569