- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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.
Advertisements