Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to check database size mysql

// QUERY 

SELECT table_schema AS "Database Name",
  ROUND(SUM(data_length + index_length) / 1024 / 1024, 2)
  AS "Size in (MB)"
  FROM information_schema.TABLES
  GROUP BY table_schema;
Comment

check all database size in gb mysql

# Check All Database Size in MB

SELECT table_schema AS "Database", 
ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Size (MB)" 
FROM information_schema.TABLES 
GROUP BY table_schema;
Comment

mysql check db size

SELECT table_schema "DB Name",
        ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" 
FROM information_schema.tables 
GROUP BY table_schema; 
Comment

check database size in gb mysql

# Check Single Database Size in MB

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;
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql backup database 
Sql :: update con select postgresql 
Sql :: sql count unique values in one column 
Sql :: postgresql subtract date/hours 
Sql :: get primary key of last inserted record sql server 
Sql :: creating index in mysql 
Sql :: sql extract from mail 
Sql :: count in sql and diff 
Sql :: with postgres 
Sql :: rename table sqlite 
Sql :: distinct sql 
Sql :: current date in sql 
Sql :: sql query to select even numbers 
Sql :: sql server create constraint 
Sql :: if column value is null then in mysql 
Sql :: installing mysql on centos 7 
Sql :: create temp table in sql 
Sql :: mysql repeated values 
Sql :: q operator in plsql 
Sql :: how to view created temporary tables in mysql 
Sql :: postgresql full text search 
Sql :: between keyword in sql 
Sql :: sql datitime to date 
Sql :: declare table variable sql 
Sql :: sql select row with max date 
Sql :: install mysql 5.7 ubuntu 20.04 
Sql :: sql server change column data type 
Sql :: import mysql database command line linux 
Sql :: mysql query to find duplicate records 
Sql :: location of the log postgresql linux 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =