How can you determine how much disk space a particular MySQL table is taking up?

前端 未结 8 544
死守一世寂寞
死守一世寂寞 2020-11-30 16:20

Is there a quick way to determine how much disk space a particular MySQL table is taking up? The table may be MyISAM or Innodb.

8条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-30 16:53

    You could perhaps look at the size of the files...

    Each table is stored in a couple of separate files inside a folder that is named whatever you called your database. These folders are stored within the mysql data directory.

    From there you can do a 'du -sh .*' to get the size of the table on disk.

提交回复
热议问题