Search
 
SCRIPT & CODE EXAMPLE
 

SQL

get database size mysql

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

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

get database size mysql

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

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

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

check all 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 db size 
Sql :: oracle like case insensitive 
Sql :: sql server date format dd/mm/yyyy 
Sql :: mysql to lowercase 
Sql :: how to change the value of a table in sql 
Sql :: mysql select column where has non int values 
Sql :: minus vs intersect in sql 
Sql :: get last week data in mysql 
Sql :: oracle db get table sizes 
Sql :: rabbitmq service not starting 
Sql :: mssql how to insert more than 1000 rows 
Sql :: mysql - find in comma separated string of values 
Sql :: oracle invalid table name 
Sql :: set column to not null mysql 
Sql :: find tables with column name in sql 
Sql :: ubuntu mysql cannot connect to database server remote 
Sql :: postgresql left join distinct on 
Sql :: mysql grant grant option 
Sql :: how to add CHECK constraint to a column in postgres 
Sql :: add computed column to table sql server 
Sql :: sql where first letter 
Sql :: allow external access to mysql 
Sql :: oracle trigger 
Sql :: show all database inside postgresql 
Sql :: mysql error 1251 
Sql :: dateadd in sql 
Sql :: postgresql find duplicates 
Sql :: sql compare two tables for differences 
Sql :: sql extract numbers from string 
Sql :: t-sql delete view if exists 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =