当前位置:网站首页>Database log
Database log
2022-06-27 20:02:00 【Invincible Dragon Warrior】
List of articles
redo log
redo log: Redo log , Used to record changes in transaction operations , Ensure transaction persistence .redo log Start recording after the transaction starts ( It's not a business commit It's not recorded until the end of the year , Because there may be many changes in the whole transaction , If in commit Only when you write redo log Words , It may take a long time . It's business begin It was recorded after the beginning , With the modification of data during transaction execution , Write in real time redo log), Whether the transaction is committed or not is recorded , When an exception occurs ( Such as power failure during data persistence ),InnoDB Will use redo log Back to the time before the power down , Ensure data integrity .

innodb_log_buffer_size The default is 16M, Namely redo log Size of buffer , It starts with the transaction , Start writing redolog, If the transaction is big , In order to avoid spending too much disk during transaction execution IO, You can set a larger redo log cache , Save disk IO. There is a time to refresh the disk . When the time comes, it costs disk IO, If buffer The larger , Will reach the refresh time more slowly , More efficient .
InnoDB Modify operation data , Not directly modify the data on the disk , Actually, it's just a modification Buffer Pool Data in .InnoDB Always put it first Buffer Pool Data changes in are recorded to redo log in , Used for data recovery after crash . Priority record redo log, Then find a time to slowly Buffer Pool The dirty data in is flushed to disk .
innodb_log_group_home_dir Two files in the specified directory :ib_logfile0,ib_logfile1, This file is called the redo log .
buffer pool Buffer pool :(B+ Tree index , Adaptive hashing )
effect : Speed up reading and speed up writing , Direct manipulation data page, Write redo log Even if the modification is completed , There are special threads to do buffer pool Medium dirty page Write to disk .
undo log Rollback log
undo log: Rollback log , Save a version of the data before the transaction , Used for rollback operation during transaction execution , At the same time, it also realizes multi version concurrency control (MVCC) The key technology of read down operation .
undolog The main function of rollback log :
- 1. Rollback when a transaction has an error rollback, Rollback log ( When the data is updated , Save the data before the change in the rollback log , The purpose is to roll back the transaction in case of error or when we roll back manually , The initial data can be found in the rollback log )
- 2. Provides MVCC Non locked reading ( Read the snapshot )
边栏推荐
- Crawl national laws and Regulations Database
- ABAP essay - get new crown data through API
- 指针和结构体
- [required reading for high-quality products] sub query of Oracle database in Linux system
- Hanoi Tower problem
- 数据库锁问题
- 1023 Have Fun with Numbers
- qt中文乱码
- [debug] platform engineering interface debugging
- 1024 Palindromic Number
猜你喜欢
![[debug] platform engineering interface debugging](/img/bc/ec630358b039c2a9551b7ae99d7fb3.png)
[debug] platform engineering interface debugging

SQL Server - Window Function - 解决连续N条记录过滤问题

Bit.Store:熊市漫漫,稳定Staking产品或成主旋律

What is ssr/ssg/isr? How do I host them on AWS?

Adding, deleting, modifying and querying MySQL tables (basic)
![[bug] Lenovo Xiaoxin has a problem. Your pin is unavailable.](/img/2a/da8e998cb4e89d655f3c4116316925.png)
[bug] Lenovo Xiaoxin has a problem. Your pin is unavailable.

【精品必读】Linux系统Oracle数据库趣解子查询

【debug】平台工程接口调试

MySQL表的增删改查(基础)

429- binary tree (108. convert the ordered array into a binary search tree, 538. convert the binary search tree into an accumulation tree, 106. construct a binary tree from the middle order and post o
随机推荐
金鱼哥RHCA回忆录:DO447管理项目和开展作业--创建作业模板并启动作业
rust 中的结构体
数智化进入“深水区”,数据治理是关键
(LC)46. Full Permutation
Memoirs of actual combat: breaking the border from webshell
Hanoi Tower problem
308. 二维区域和检索 - 可变 线段树/哈希
数仓的字符截取三胞胎:substrb、substr、substring
Bit. Store: long bear market, stable stacking products may become the main theme
嵌入式软件开发中必备软件工具
现在网上买股票开户身份证信息安全吗?
Golang map 并发读写问题源码分析
shell脚本常用命令(四)
Is it safe to buy stocks online and open an account?
蓄力中台,用友iuap筑牢社会级企业数智化新底座
Data intelligence enters the "deep water area", and data governance is the key
Redis cluster Series III
【bug】上传图片出现错误(413 Request Entity Too Large)
Pointers and structs
网络上开户买股票是否安全呢?刚接触股票,不懂求指导