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

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

mysql size of database

SELECT table_schema "Data Base Name", sum( data_length + index_length ) / (1024 * 1024) "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema ;
Comment

get size of mysql database

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

PREVIOUS NEXT
Code Example
Sql :: get two decimal places in sql server 
Sql :: sql rename column 
Sql :: mysql create timestamp column 
Sql :: How to reset forgotten postgresql password 
Sql :: An error occurred while installing mysql2 (0.3.20), and Bundler cannot continue. 
Sql :: mysql incrementation 
Sql :: oracle sessions_per_user 
Sql :: join to find results not in another table 
Sql :: calculate age in sql 
Sql :: sql display number without decimals 
Sql :: epoch time converter in snowflake 
Sql :: sql delete join 
Sql :: ORA-00903 
Sql :: sql order by case 
Sql :: postgresql get last 10 records 
Sql :: drop foreign key mysql 
Sql :: sql missing values 
Sql :: current year sql 
Sql :: mysql timestamp to date 
Sql :: mysql query to check record exists in database table or not 
Sql :: mysql select where starts with 
Sql :: duplicate table sql 
Sql :: show slave status mysql 
Sql :: SQL Remove Index From Tables 
Sql :: csv to sqlite python 
Sql :: convert money to varchar sql server 
Sql :: create table postgresql foreign key 
Sql :: postgres create extension if not exists 
Sql :: how to extract year from date in sql 
Sql :: sql update table set text to lowercase 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =