Home > Database > Mysql Tutorial > body text

数据库中NOLOGGING和FORCELOGGING的理解

WBOY
Release: 2016-06-07 15:23:56
Original
2009 people have browsed it

欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入 其实nologging与表模式,插入模式,数据库运行模式(archived/unarchived)都有很大的关系: 总结如下: 注意append是一种hint; 一般我们可以这样来使用 insert /*+append+/ into mytable values(

欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入

  其实nologging与表模式,插入模式,数据库运行模式(archived/unarchived)都有很大的关系:
 
  总结如下:
 
  注意append是一种hint;
 
  一般我们可以这样来使用
 
  insert /*+append+/ into mytable values(1,'alan');
 
  数据库在归档模式下
 
  当表模式为logging状态时,无论是append模式还是no append模式,redo都会生成。
 
  当表模式为nologging状态时,只有append模式,不会生成redo
 
  数据库在非归档模式下
 
  无论是在logging还是nologing的模式下,append的模式都不会生成redo,而no append模式下都会生成redo.如果我想看一张表是否是logging状态,可以这样
 
  select table_name,logging from dba_tables where table_name='tablename';

  那么在Oracle内部还存在一个内部参数:_disable_logging 默认是false
 
  通过更改为true可以让Oracle在修改表中的记录的时候完全不记录redo,这个参数要甚用。平时,我们只作为性能测试用。
 
  force logging(强制日志)模式:
 
  通过命令:
 
  alter database force logging来使得Oracle无论什么操作都进行redo的写入。
 
  通过select force_logging from v$database可以看到当前数据库强制日志模式的状态。

数据库中NOLOGGING和FORCELOGGING的理解

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!