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

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 :: sql server convert date to int 
Sql :: set statistics on in ssms 
Sql :: how to give access to database in postgresql server to another user 
Sql :: autocommit mysql 
Sql :: mysql get count of rows 
Sql :: hexadec to sql REDSHIFT 
Sql :: sql beginning of previous month 
Sql :: select from one table where not on the other 
Sql :: sql current timestamp 
Sql :: postgres count distinct 
Sql :: setVal pgsql 
Sql :: how to select department from table 
Sql :: insert postgres 
Sql :: oracle apex prevent initial load 
Sql :: group by mysql and concatenate string 
Sql :: create policy in sql 
Sql :: oracle view ddl 
Sql :: sql week commencing date 
Sql :: sql random decimal 
Sql :: how to install sqlite3 python 
Sql :: oracle sql day of month from date 
Sql :: sql update alias 
Sql :: postgres list tables and row counts 
Sql :: login to mysql 
Sql :: mysql select month and year 
Sql :: mysql update set sum 
Sql :: how to get table current identity value in sql server 
Sql :: how to find column in all the tables sql 
Sql :: fetch first 5 characters of the string in sql 
Sql :: how to use like in sql 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =