This is something to keep in mind, and why the OS PoV is so important. SELECT table_name AS "Table", ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size (MB)" FROM information_schema. 17.9k 5 58 97 asked at 13:39 powtac 161 2 10 If you use innoDB, you will have log files which can become very large and add to the size of the database exponentially. However the database grew to 1.04 GB while my hosting server limit for databases is. Suppose, we have a database named “ test” and we want to find the size of all the tables in that database, then the query to do so will be: Hi, I am using SuiteCRM for more than a year now and it serves me well. Here, we need to replace “ database_name” with the name of the database whose table’s size we are going to find. To access DB size I need that the user monitor can access informationschema. to monitor mysql> flush privileges Now Im required to check database size. SELECT table_name AS "Table", ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size (MB)" FROM information_schema.TABLES WHERE table_schema = "database_name" ORDER BY (data_length + index_length) DESC mysql> create user monitor identified by monitorpassword mysql> grant SHOW DATABASES, REPLICATION CLIENT on. Get size (in MB) of all tables of a particular database Suggested Read: Handy MySQL Commands Cheatsheet 2018 Command: select tableschema Database, Round(Sum(datalength + indexlength) / 1024 / 1024, 1) Size. The result will be displayed something like below: Database Name SELECT table_schema "Database Name", sum( data_length + index_length ) / 1024 / 1024 "Database Size in MB" FROM information_schema.TABLES GROUP BY table_schema It also shows the query to get the size (in MB) of all the tables present in any particular database. This article shows SQL query to get size (in MB) of all MySQL databases. Facebook Tweet LinkedIn Pin Print Email Shares
0 Comments
Leave a Reply. |