Today received the Kingsoft alarm, said there was a database of capacity alarm, I boarded the console to see,
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/9B/E9/wKioL1loiCXgGB6SAACXZomq3kM185.png "title=" 1.png "alt=" Wkiol1loicxggb6saacxzomq3km185.png "/>
Then I landed on the MySQL client and queried the size of the database on the command line as a value:
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/9B/E9/wKiom1loiLKwO2BxAABbHpW1Cn8153.png "title=" 1.png "alt=" Wkiom1loilkwo2bxaabbhpw1cn8153.png "/>
There is a difference of nearly 20 g in the outside, so where is the gap between the 20 g?
Use show binary logs; look at the Binlog, forget about 5G or so, there is about 15G of access. This access is bigger, and then remember to have seen " if there is a query that has a InnoDB table for a long time, and the table has a large number of data changes during the query, a large amount of Undo information will be generated, resulting in an increase in the size of the Ibdata1 file. Due to the limitations of the MySQL internal mechanism, IBDATA1 files are currently not supported for shrinking. "
So it is necessary to query the size of the Ibdata file, but because I am a MySQL client, and query Ibdata is to use the Innochecksum command in the MySQL server segment operation, so please Jinshan after the sale to help query, Jinshan checked a bit, The result 144M, in the disappearance of the 15G is completely negligible.
Here an extra sentence, the Ibdata file is not very small, the database slow operation is very small, running state is normal.
This time, it's going to be a problem. The specific distribution of data size,
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9B/E9/wKioL1lojV6yJxA2AAAPxHc1w1I046.png "title=" 1.png "alt=" Wkiol1lojv6yjxa2aaapxhc1w1i046.png "/>
These values add up to 84.6G, plus 5 g of the Binlog log, almost 90 g. This shows that select CONCAT this statement is not allowed, the actual situation is much larger than this value.
This article is from "Life is waiting for Gordo" blog, please make sure to keep this source http://chenx1242.blog.51cto.com/10430133/1947643
The capacity of the database is weird ...