Home > database >  Ibdata1 is too big, how to don't delete data or delete data make less MQSQL run
Ibdata1 is too big, how to don't delete data or delete data make less MQSQL run

Time:09-26

Var in disk usage rate is 100%, other directories are very small, the customer does not provide expand disk service

Server version: 5.0.77 Source distribution
Mysql with system installation time check installation
In the/var/lib/mysql I see database name of the file size is only 4 k, several other following
Ibdata1 -- -- -- -- -- -- -- -- --
16 gIb_logfile0-5 m
Ib_logfile1-5 m

My question is
1, the actual data in the database in which directory which file, the name call what (feeling said in an online)
2, from ibdata1 inside put the search on the net seems to be not the actual data (i.e., not table records), is all some indexes, such as and I add some database then ibdata1 size is growing, after I deleted database ibdata1 no change
3, according to the website "independent table space", whether the ibdata1 split into several table directory, then the disk is not big enough or not, this how to solve the

From what has been discussed above, it is without any increase in disk or delete data under the condition of less as far as possible, change the ibdata1 dot, mysql to run, thank you.

CodePudding user response:

Please do the entire content of the disk will save point, don't I split into each table, and then the total size of the same

In addition, the trouble to answer me a few other questions, thank you

CodePudding user response:

Use this script to check the footprint, attention to your user
The select TABLE_NAME, concat (truncate (data_length/1024/1024, 2), 'MB) as data_size, concat (truncate (index_length/1024/1024, 2),' MB) as index_size from information_schema. Tables where TABLE_SCHEMA='cc' group by TABLE_NAME order by data_length;
To use optimize table table name
The big table clean

CodePudding user response:

@ CKC tables are checked for particularly big, I want to ask if I delete the data inside ibdata1 become smaller,

I delete the database before ibdata1 did not reduce (see my top floor)

CodePudding user response:

After delete does not become smaller, still need to use optimize table table name
Clear up will be smaller
  • Related