Why does InnoDB continue to grow without any updates?

I have a table made up of heavy drops and I would like to do some tests on it.

I know that remote spaces are not disposed of by InnoDB, so I decided to use existing records, updating my own values ​​instead of creatinging new records.

But I noticed if I can delete and insert a new record, or I UPDATE on an existing ROW, InnoDB continues to grow.

Assuming I have 100 lines, each of which stores 500KB of information, My InnoDB size is 10MB, now when I call UPDATE on all lines (without insertion / without deletion), then InnoDB does not grow by ~ 8MB for every start I . All I do is that I store exactly 500 Kbytes of data on each line, with slight changes, and the blob size is fixed.

What can I do to prevent this?

I know about optimize tables, but I can’t do it, because on regular use, the table will be 60-100GB large, and working optimizes will only slow down the entire server.

+3
source share
2 answers

But I noticed if I delete and insert a new record, or I REALLY contact an existing ROW, InnoDB continues to grow.

InnoDB - .

, , , , rollback segment. ( UPDATE) ( DELETE).

SELECT ( , ), rollback segment.

, InnoDB . , . , , , , .

ibdata*, , InnoDB .

innodb_file_per_table, ibdata*.

, , , , - . , OPTIMIZE, ( ), .

+5

,

OPTIMIZE TABLE table_name;

+2

Source: https://habr.com/ru/post/1782443/


All Articles