
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
How Can I check the size of the tables in a particular MySQL database?
As we have checked the size of the MySQL database, similarly we can also check the size of tables in a particular database. It can be done as follows −
mysql> SELECT -> table_name AS "Table", -> round(((data_length + index_length) / 1024 / 1024), 2) as SIZE -> FROM information_schema.TABLES -> WHERE table_schema = "SAMPLE" -> ORDER BY SIZE; +-------------+-------+ | Table | SIZE | +-------------+-------+ | employee | 0.02 | | student | 0.02 | | new_student | 0.02 | +-------------+-------+ 3 rows in set (0.00 sec)
Here this output gives the size of three tables in the Sample database.
- Related Articles
- How can we check the character set of all the tables in a particular MySQL database?
- How can I check MySQL tables from a database in accordance with particular\ncolumn/s name?
- How can I check the character set of all the tables along with column names in a particular MySQL database?
- How to check table status of the tables in a particular MySQL database?
- How can we analyze the tables of a particular database from MySQL Server command line?
- How to get the size of the tables of a MySQL database?
- How can I check the tables of databases other than current database?
- How can we check the default character sets of a particular MySQL database?
- How can we get the list of tables in a particular database from MySQL Server command line?
- While connecting to one MySQL database, how can I see the list of tables of other MySQL database?
- How can I describe all tables in the database through a single statement in MySQL?
- Get a list of non-empty tables in a particular MySQL database?
- How to check statement of creating a particular MySQL database?
- How can I check the list of MySQL tables, in the current database we are using, along with table type in the result set?
- Can I use InnoDB and MyISAM tables in a single database in MySQL?

Advertisements