MySQL Forums
Forum List  »  Newbie

Re: Freeing up disk space from information_schema
Posted by: Peter Brawley
Date: June 24, 2022 10:12AM

"Running low on disk space" means what proportion of the disk is full?

Optimize Table might increase or decrease the data_free value, eg see

Information_schema is just reporting these usage values---they aren't "in" information_schema. Let's see the MySQL version, the OS and version, the result of ...

select engine,data,indexes,total
from (
    ifnull(engine,'TOTALS') as engine, 
    concat(data,' GB') as data, 
    concat(indexes,' GB') as indexes, 
    concat(tot,' GB') as total,
    if(engine is null,-1,tot) as ord
  from (
      round( sum(data_length)/1024/1024/1024, 2 ) as data,  
      round( sum(index_length)/1024/1024/1024, 2 ) as indexes,  
      round( sum(data_length+index_length)/1024/1024/1024, 2 ) as tot
    from information_schema.tables
    where engine is not null and engine not in('information_schema','performance_schema')
    group by engine with rollup
  ) sums
) list
order by list.ord desc;

..., the disk size, the amount of free disk space on the disk, and swapping stats from your OS.

Options: ReplyQuote

Written By
Re: Freeing up disk space from information_schema
June 24, 2022 10:12AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.