书上说:checkpoints可以用log_checkpoint_interval及log_checkpoint_timeout这两个参数进行调整,请教各位大虾:log_checkpoint_interval及log_checkpoint_timeout是如何对checkpoints起作用的呢?

解决方案 »

  1.   

    2、log_checkpoint_intervalOracle8.1版本后log_checkpoint_interval指的是两次checkpoint之间操作系统数据块的个数。checkpoint时Oracle把内存里修改过的数据块用DBWR写到物理文件,用LGWR写到日志和控制文件。
    一般UNIX操作系统的数据块为512bytes。
    从性能优化来说log_checkpoint_interval=redologfilesizebytes/512bytes3、log_checkpoint_timeoutOracle8.1版本后log_checkpoint_timeout指的是两次checkpoint之间时间秒数。
    Oracle建议不用这个参数来控制,因为事务(transaction)大小不是按时间等量分布的。用log_checkpoint_interval参数控制会好一些。
    禁用此参数或者按默认的900。log_checkpoint_timeout=0
      

  2.   

    如果用9i,用fast_start_mttr_target参数控制checkpoint更好
      

  3.   

    非常感谢楼上两位老大的回答!  我用的是Oracle8i
    TO  welyngj(平平淡淡) :
    对于这句话:"从性能优化来说log_checkpoint_interval=redologfilesizebytes/512bytes"
    我可以这样理解吗? 就是说通过调整log_checkpoint_interval的大小,来改变redologfilesize,进而影响checkpoint的发生频度, 最后影响实例恢复时所需要的时间, 这样理解对吗?
      

  4.   


    log_checkpoint_interval=redologfilesizebytes/操作系统块大小
    所以设置log_checkpoint_interval的时候,要避免不必要的检查点
    log_checkpoint_interval的大小,改变不了redologfilesize但redologfilesize也是影响检查点的间隔
      

  5.   

    有点糊涂了,log_checkpoint_interval这个参数究竟是干什么用的?或者说它变大变小会引起哪些什么后果呢?
      

  6.   

    主要是影响数据库的RECOVER,log_checkpoint_interval实际上定义了ORACLE在两次CHECKPOINT之间所经过的最大的REDO BLOCK的大小,也就是保证ORACLE在RECOVERY状态时最多不会要求恢复超过log_checkpoint_interval的块数。要注意这个块数是指操作系统的块数,而不是数据库的。
      

  7.   

    感谢楼上的回答!前几天一直不能上CSDN.还是没有很明白log_checkpoint_interval这个参数的作用,书上有下面这一段话我看了又看还是弄不清楚它的含义:
    Checkpoints can be adjusted using the following initialization parameters:
    LOG_CHECKPOINT_INTERVAL  The checkpoint position in the redo log files cannot lag behind the end of the log file by more than the number of OS blocks specified by this parameter(--唉,光这句话我就犯晕了). (In release 8 and earlier, this parameter specified the frequency of checkpoints in terms of operating system blocks; after the LGWR writes a specified number of blocks to the redo log file, a checkpoint is initiated). This ensures that no more than a fixed number of blocks are read during instance recovery. For example, if the redo log file size is 1MB, that is 2000 OS blocks; if the OS block size is 512KB, then setting the parameter to 500 will initiate a checkpoint  when the redo log file is 1500 blocks full. If this parameter value exceeds the actual redo log file size or is set to zero, then checkpoints occur only when a log switch occurs. The default value for this parameter is OS dependent.
    哪位大虾可以帮助解释一下上面这段话的含义?