早上读老熊的博客Hint的常见错误使用方式, 评论中有朋友提到, 表没有nologging属性, 插入语句之后, 会话的统计信息redo size为0. 是不是统计信息出错? 我猜想是因为In Memory Undo(IMU)的缘故, 下午做了一下测试, 顺便整理IMU的知识.
Continue reading
Category Archives: Oracle
Side Effect Of Optimizer_capture_sql_plan_baselines
I got the report that a test DB cannot be logined. The error message indicates that sysaux is full. The tablespace sysaux have 4G, while the top one LOBSEGMENT SYS_LOB0000164261C00005 consumes 1.8G. The system-generated names for lob segment default to the format:
SYS_LOB {10 digit object_id} C {5 digit col#} $$
Continue reading
Small Tables
Jonathan Lewis Write a section about the Oracle’s behavior for tablescan and index fast full scan, in his new book “Oracle Core”.
Why does Oracle need to take care the tablescan seriously?
If you scan a large object, you could flush a huge amount of useful data from the cache,data that you may then have to reread very promptly. Tablescans shouldnt really happen often in OLTP systems, and when they do happen, you need to ensure that they dont cause problems. The potential for performance problems relating to tablescans resulted in Oracle Corp. writing code to distinguish between “short and “long tables (and, recently, “medium tables, although there are no statistics collected to record that particular option).
Latch Level
Cuihua pointed out that there is a mistake in a latch level description in Janathan Lewis’s new book “Oracle Core”. Here is his blog. In page 116 of the section “Loading a Hash Chain” in Chapter 5.
SQL> select name, level# 2 from v$latch 3 where name in ('cache buffers lru chain','cache buffers chains') 4 / NAME LEVEL# ------------------------------- ------ cache buffers lru chain 2 cache buffers chains 1 2 rows selected.The cache buffers chains latch has a lower level than the cache buffers lru chain latch, so we can’t request the cache buffers lru chain latch in willing-to-wait mode if we’re already holding the cache buffers chains latch. Think about what this means: we’re holding the cache buffers chains latch (which I will call the hash latch for the rest of this subsection) because we’ve just searched the hash chain for a buffer and discovered that, for whatever reason, we need to add another buffer to the chain. So we have to acquire the cache buffers lru chain latch (which I will call the lru latch for the rest of this subsection) to move a buffer from the REPL_AUX list to the midpoint of the REPL_MAIN list; but we can’t request it in willing-to-wait mode because we’re already holding a lower-level latch.
…
But if you can’t get the lru latch with an immediate get, you have to drop the hash latch, get the lru latch, and then get the hash latch again.
…
Relative File Number
The blog is to show my investigation on absolute and relative file number. First, here is the explanation from online doc for the absolute and relative file number.
Continue reading
2011关于Oracle的书单
Oracle Core Essential Internals for DBAs and Developers – Jonathan Lewis
很可能是未来十年,关于Oracle内部机制最好的书籍. 书评见这里
Continue reading