存档

2009年1月14日 的存档

我们都知道truncate操作会做什么:移动HWM,释放extent,重新生成data_object_id。truncate之所以比比delete快,是因为它根本不需要删除数据。但是在实际中我们经常碰到truncate很慢的情况,实际上它比我们想象的要复杂。
1.在truncate之前,CKPT必须搜索整个buffer cache,把这个object的dirty buffer全部写回磁盘(这个操作在10g有了改进,我们后面再说)。在这个过程中,系统很可能会出现DBWR的等待事件,如果dirty buffer对应的redo还没有被写入,也有可能会出现LGWR的等待事件,比如log file sync。有人说truncate之前要做一次checkpoint,并不是特别确切。
When a truncate is issued, the checkpoint process does a complete scan (till 9204) of the buffer cache.  All of the dirty buffers of the object in the buffer cache are written down to disk.  All of the clean buffers are are invalidated.
2.是否使用了reuse storage,因为需要释放空间,尤其对于字典管理的表空间。很可能会出现Waits on ST enqueue的等待事件。
3.Waits on “RO enqueue” [...]

1 14th, 2009 | Filed under 大话技术
标签:

我们一般认为oracle的归档行为是:按照LOG_ARCHIVE_DEST_n的设置,先归档第一个路径(local destination),然后再归档另一个路径(remote destination)。 The Devil’s Own movie download
实际上并不是这样,Oracle 9iR2及其以前的版本中,Oracle总是一次得到所有的归档路径列表,然后依次从online redo中读取1M数据,依次发送到各归档目标路径。这样,整个归档的时间就取决于最慢的路径,比如远程的standby。如果当网络发生问题时,很可能出现归档进程hang住,导致日志无法切换。
The ARCH process sits in a very tight loop waiting for an update to the controlfile that states an online log needs to be archived.  Once the update occurs the ARCH process builds a list of archive destinations that need to be serviced.  Once this [...]

1 14th, 2009 | Filed under 大话技术
标签: