

We can even get a bit fancier and convert the normal size values from bytes into something more useful and understandable to most people like megabytes. Press (Shift + Command + Enter) <- if you are using a Mac version of workbench.

INDEX_LENGTH is the length (or size) of the index file for the table (also in bytes).Īrmed with this information, we can execute a query that will list all tables in a specific database along with the disk space (size) of each.DATA_LENGTH is the length (or size) of all data in the table (in bytes).List Table Sizes From a Single DatabaseĪs can seen in the official documentation, the INFORMATION_SCHEMA.TABLES table contains around 20 columns, but for the purpose of determining the amount of disk space used by tables, we’ll focus on two columns in particular: DATA_LENGTH and INDEX_LENGTH.

As an illustration, lets take the first ten table names: adminassert. Is is possible to develop a plugin for MySQL Workbench which would display these tables as a tree in the object browser (or add an additional tree view). For our purposes we’re particularly interested in the tables metadata, which we can query to actually extract the size of various tables in the system. Hello, there are over 300 tables in magento such that the simple tree view of tables on the left side does not help much. Everything from views and user_privilieges to columns and tables can be found in the INFORMATION_SCHEMA. Choose an existing connection to connect to MySQL Server or create a new one. To view the database created on MySQL Workbench, navigate to Database > Connect to Database. Regardless of the name, what matters is the information provided by these INFORMATION_SCHEMA tables. The generated SQL file is used to create a physical database in the connected MySQL Server. While most other databases refer to this information as a catalog, the official MySQL documentation refers to the INFORMATION_SCHEMA metadata as tables. Like most relational databases, MySQL provides useful metadata about the database itself.
