O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

INNODB_SYS_TABLESPACES

The size of the file is also available in the INNODB_TABLESPACES table:

mysql> SELECT * FROM INNODB_TABLESPACES WHERE NAME='employees/employees'\G*************************** 1. row *************************** SPACE: 118 NAME: employees/employees FLAG: 16417 ROW_FORMAT: Dynamic PAGE_SIZE: 16384 ZIP_PAGE_SIZE: 0 SPACE_TYPE: Single FS_BLOCK_SIZE: 4096 FILE_SIZE: 32505856ALLOCATED_SIZE: 325099521 row in set (0.00 sec)

You can verify the same in the filesystem:

shell> sudo ls -ltr /var/lib/mysql/employees/employees.ibd-rw-r----- 1 mysql mysql 32505856 Jun 20 16:50 /var/lib/mysql/employees/employees.ibd

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required