Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ MySQL rollback insert statement causes ibd file grows double     - MySQL various log summary (Database)

- RHEL7 unattended automatic installation DHCP + TFTP + SYSLINUX + TFTP + Kickstart (Linux)

- ASP.NET 5 tutorial series (Server)

- gzip, bzip2, xz, tar, zip compression, archive Detailed (Linux)

- Use the command line MySQL database backup and recovery (Database)

- Setting the RedHat9 Intrusion Detection System (Linux)

- Android determine the device network connection status, and determine the connection (Programming)

- Sublime Text 3 using summary (Linux)

- Merge sort Java implementation (Programming)

- iOS developers - a simple factory pattern and OC reflection (Programming)

- GitLab upgrade to 8.2.0 (Linux)

- Linux Getting Started tutorial: 3D effects and beautify your desktop (Linux)

- Linux iptables: basic principles and rules (Linux)

- Upgrading from Fedora 20 to 21 (Linux)

- Learn to read the source code of vmstat (Linux)

- Struts2 configure a static resource files without Struts processing (regular match) (Programming)

- fcntl file locking function add (Programming)

- About Hibernate cache, you want the latest data have trouble even session.clear (Database)

- Oracle and MySQL difference between the jdbc (Database)

- Programmers Do not neglect debugging techniques (Programming)

  MySQL rollback insert statement causes ibd file grows double
  Add Date : 2017-01-08      
  MySQL rollback insert statement causes ibd file grows 'double', a simple test:

start transaction;
insert into tb1 values (3, repeat ( 'a', 65000), 'x', 1);

Is tb1.ibd before insertion, before the rollback, the rollback file size

Why rollback will result tb1.idb disk space increases?

In fact, the reason is very simple:

131072-98304 163840-131072 = 32768 =
So: Rollback insert = delete + re-insert, and delete refers to set up some flag, so ... content doubled.

insert rollback operation, first delete before insert value, and then re-insert again, and delete the tombstone, which is to set a flag, not really deleted. This is the reason.

However, because the transaction did not submit, so the data has not been written to disk, then why tb1.idb the disk space it happened twice growth? Obviously, it is because tb1.idb disk space is pre-allocated, that is to say when the statement is executed, disk space has been allocated, but because the transaction did not submit, and the data can not be uncommitted checkpoint brush into the disk, allocation of disk space, but did not insert the data written to disk. At this point insert the data still exists in the buffer. Disk space is pre-allocated.
- Linux operating system set up to effectively prevent ARP attacks (Linux)
- Kali Linux resolve GPG error KEYEXPIRED 1425567400 (Linux)
- The best known for archiving / compression tool under linux (Linux)
- Oracle table space usage monitoring (Database)
- Raspberry Pi 2 to install the latest version of the FPC and Lazarus 1.5 (Linux)
- Linux data recovery software efficiently practical application extundelete (Linux)
- Linux uses a screen recording under RecordMyDesktop (Linux)
- shell script: MySQL startup script simple (Database)
- OpenGL Superb Learning Notes - New Patterns (Programming)
- Linux operating system Samba server configuration and use (Server)
- Oracle RAC node on the expulsion of the inspection process on OEL6.3 (Database)
- How to install GIMP 2.8.16 in Ubuntu 16.04,15.10,14.04 (Linux)
- RedHat command line and graphical interface switching (Linux)
- Ftp user to create multiple virtual machines to support different access rights Examples (Server)
- Linux firewall settings -DNS server articles (Server)
- CentOS 6.5 / Linux restart network card being given Determining if ip address x.x.x.x is already in use (Linux)
- Java call by value and by reference (Programming)
- Binary tree traversal: the first sequence in order preorder recursive and non-recursive and traversal sequence (Programming)
- How Glances monitoring system on Ubuntu (Linux)
- CentOS7 virtual machine settings, and bridging problems (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.