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

check database size in 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 :: get monday of current week sql 
Sql :: sql asynchronous stored procedure call 
Sql :: postgres in operator with comma separated values 
Sql :: alter table auto_increment 
Sql :: alter tablespace add datafile 
Sql :: mysql output csv 
Sql :: sql server convert string to date 
Sql :: sql auto timestamp 
Sql :: oracle sql group by date year 
Sql :: hangfire clear all jobs 
Sql :: An error occurred while installing mysql2 (0.5.3) 
Sql :: MySQL insert into examble 
Sql :: sysdate in oracle sql 
Sql :: calculate age in sql 
Sql :: ajouter une clé etrangere mysql 
Sql :: oracle undotbs usage 
Sql :: view t-sql mail configuration 
Sql :: how to remove a column from a table in MySQL 
Sql :: nosql databases list 
Sql :: oracle source code 
Sql :: mysql grant grant option 
Sql :: wordpress delete post revisions older than date "sql" 
Sql :: delete temp table if exists 
Sql :: sql server query all database objects 
Sql :: update value postgresql 
Sql :: limit sqlserver 
Sql :: get primary key of table 
Sql :: update using case in mysql 
Sql :: mysql row_number() example 
Sql :: how to use rank function in sql 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =