Oracle, Odbc and DB2-CLI Template Library, Version 4.0
Frequently Asked Questions
Please, send your questions and comments to skuchin@ispwest.com, skuchin@gmail.com
Q. OTL: how does OTL handle NULLs?
- Call otl_stream::is_null() to check whether the value that was just read from the stream is NULL or not.
- Use template class otl_value<T>.
- If there is a need to set the output variable to a value when NULL is fetched (by default, OTL does not set the output byffer to any value in the case of NULL), the following #defines could be enabled:
Q. OTL: is it thread safe?
阅读全文…
关于Oracle中各个命中率的计算以及相关的调优
1)Library Cache的命中率:
.计算公式:Library Cache Hit Ratio = sum(pinhits) / sum(pins)
- SQL>SELECT SUM(pinhits)/sum(pins)
- FROM V$LIBRARYCACHE;
通常在98%以上,否则,需要要考虑加大共享池,绑定变量,修改cursor_sharing等参数。
阅读全文…
Oracle性能优化基本方法包括一下几个步骤,包括:
1)设立合理的Oracle性能优化目标。
2)测量并记录当前的Oracle性能。
3)确定当前Oracle性能瓶颈(Oracle等待什么、哪些SQL语句是该等待事件的成分)。
4)把等待事件记入跟踪文件。
5)确定当前的OS瓶颈。
6)优化所需的成分(应用程序、数据库、I/O、争用、OS等)。
7)跟踪并实施更改控制过程。
8)测量并记录当前性能
9)重复步骤3到7,直到满足优化目标
下面来一一详述。
阅读全文…