Getting Contiguous Space Currently in the Shared Pool(Oracle10g Tuning Technology)

共享池错误与PL/SQL优化
本文探讨了Oracle数据库中共享池返回错误的原因,并提供了一种查询方法来找出大型PL/SQL代码片段,以便进行优化或固定。通过查询x$ksmsp表,可以找出已加载到共享池中的大型代码,帮助管理员了解哪些代码需要被固定或者缩短。

 

 

Why does the shared pool return errors when an object is loaded? The answer is that a large

enough piece of the shared pool is not available to fit the piece of code. We saw in the last

section how to find the size of the code that you have. We also saw in a previous section how to

pin pieces of code into the shared pool. Now, we must look at the query that will tell you which

code, that has made it into the shared pool, is either very large and should be pinned or should

be investigated and shortened if possible.

The following query accesses an x$ table (see Chapter 15), and you must be the SYS user to

access these tables:

 

 

select ksmchsiz, ksmchcom

from x$ksmsp

where ksmchsiz > 10000

and ksmchcom like '%PL/SQL%';

 

 

 

This query shows that the packages that have been accessed are very large and should be

pinned at the time that the database has started. If the last line of this query is eliminated, it will

also show the large pieces of free memory (KSMCHCOM = ‘free memory’ and KSMCHCOM =

‘permanent memory’) that are still available (unfragmented) for future large pieces of code to be

loaded.

 

 

TIP

Query x$ksmsp to find all large pieces of PL/SQL that have appeared

in the shared pool. These are candidates to be pinned when the

database has started.

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值