Logon Storms on 11g ,audit maybe cause performance issue.(当创建很多连接时审计可能带来性能问题)

When multiple connection created will insert a lot of rows in aud$ table, there may be contention in the segment header for the table. This contention can manifest itself as a buffer busy wait or a freelist wait.

Delete the data on the table very slow(删除数据慢)

今天开发的同事问有个表上的数据为什么删不掉?我看了一下,也就不到100000条数据,表上有外键,等了5分钟hang在那里…

案例:latch: cache buffers chains event tuning

前两天对oracle数据库(single instance)进行了迁移升级从10.2.0.4 升到11.2.0.3,有一个项目迁完后第二天,cpu负载升到了130更高(16cpus). 向用户询问后使用上没有改变,平时就几个人使用,而该用户活动会话就有100多个。最在等待CBC latch. 怀疑是执行计划发生了改变。

About redo log wait events

log file sync wait 默认是发生在前台进程发进commits时比如用户commit,DDL,递归操作发生在dictionary table 上的DML,同时rollback 也会导致…

How to hanganalyze and systemstate dumps

Oracle support request hang analysis and system state d […]

Tuning “Backup:sbtbackup” Event

A few days ago a friend ask me to see a awr issue. In t […]

Tuning “Read by other session wait” Event

This wait event occurs when we are trying to access a buffer in the buffer cache but we find that the buffer is currently being read from disk by another user so we need to wait for that to complete before we can access it.

Tuning ‘log file sync’ Event

The log file sync wait occurs at the end of a transaction (COMMIT or End Of Job)and the database writer (DBWR) process must wait for the log file to synchronize with the database.

Troubleshooting wait event: ‘latch: row cache objects’

This latch comes into play when user processes are attempting to access or update the cached data dictionary values.

,

SQL hint mean force? More about parallel(二)(不并行的场景)

sql中如果使用了parallel hint 或是force parallel query 想并行查询的特性,如果那样做了就一定能保证 query optimizer选择并行的执行计划么?知道那样做实际上产生什么样的影响么?

,

More about index

创建索引可以方便的给DB带来查询上的性能提升,但是DML时index的维护代价也是昂贵的。合理的创建索引,删除不必要的索引。

Tuning PGA Memory

You can get the correct size of PGA using V$PGA_TARGET_ADVICE, dynamic performance view.

HAVING expression default Selectivity

In some cases the query optimizer might can not accurately estimate cardinality (e.g. group by having or like with bind variables cause etc..),therefore the Cardinality estimates are based on default seletivity of build-in oracle coredefault seletivity(5%).

How to check and reclaim allocated unused-space for the segments(预测segment回收空间)

Now I used segment advisor performs analysis on the segments and makes recommendations on how space can be reclaimed…

about get bind_data column in v$sql(绑定变量值)

今天查看AWR时,发现有个sql占用的cpu很高而且也并不复杂,top 5 event出现了cpu,read by other sessions,而且sql中再次看到的hint index,随后从生产环境中拿到绑定变量参数值进行本地调试,发现hint index 选择了错误的索引一致读为93万,去掉hint立即降低到了36,随后服务器压力将了下来

Troubleshooting log file switch (checkpoint incomplete) event

The log file switch – checkpoint incomplete event tells you that Oracle wants to reuse a redo log file, but the current checkpoint position is still in that log file. This results in redo generation being stopped until the log switch is done.

About like 5% selectivity引起的不完美执行计划

CBO优化器的内部有两个重要的标准:selectivity and cardinality,cardinality 就CBO在处理完后返回的行数,selectivity是返回数据范围百分比,cardinality = (number of input rows)* selectivity,所以selectivity 的直接影响了CBO表访问路径

程序sql不应该滥用Hint

Hint提示是优化SQL的一种手段,但不应该放在首位,记的国外有位大师说过顺序应该是学写SQL,写更好SQL,学写ORACLE SQL,写更好的ORACLE SQL,在了解原理且CBO没有走理想路线的情况下再去指引CBO。

SQL ordered by Version Count and Troubleshooting

the cause:
bug,related to name resolution issues, bind buffer length, fine grained access control, cursor invalidation, or any of the other common structural or coding reasons for multiple child cursors

, ,

materialized view query rewrite and ORA-30353

启用物化视图的重写有两个条件QUERY_REWRITE_ENABLED=true and materialized view enable query rewrite.
在CBO对查询sql 重写后估算cast后直接查询mv