Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql get table size

SELECT
  TABLE_NAME AS `Table`,
  ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)`
FROM
  information_schema.TABLES
WHERE
  TABLE_SCHEMA = "bookstore"
ORDER BY
  (DATA_LENGTH + INDEX_LENGTH)
DESC;
Comment

return size of tables in mysql

SELECT 
     table_schema as `Database`, 
     table_name AS `Table`, 
     round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` 
FROM information_schema.TABLES 
ORDER BY (data_length + index_length) DESC;
Comment

mysql size of table

SELECT table_name, round(((data_length + index_length) / (1024*1024)),2) as "size in megs" FROM information_schema.tables WHERE table_schema = "named_db";
Comment

PREVIOUS NEXT
Code Example
Sql :: convert utc to est sql 
Sql :: GROUP BY clause; this is incompatible with sql_mode=only_full_group_by 
Sql :: oracle find all tables with column name 
Sql :: alter table add column boolean 
Sql :: stop mysql 
Sql :: freemysqlhosting keeps deleting tables 
Sql :: mysql find tables with name 
Sql :: oracle finding duplicate records 
Sql :: mysql alter table add index 
Sql :: show tables sql server 
Sql :: sql list all databases 
Sql :: this month mysql where 
Sql :: list tables sqlite 
Sql :: sql search all columns of database oracle sql 
Sql :: mysql ALTER TABLE ADD COLUMN BOOLEAN AFTER DEFAULT "1"; 
Sql :: log queries postgre 
Sql :: rename column oracle 
Sql :: drop view in mysql 
Sql :: how remove column in mysql 
Sql :: mssql current date 
Sql :: mssql show database size 
Sql :: dbms_scheduler stop job 
Sql :: wordpress change http to https phpmyadmin 
Sql :: sql server select top 2 of each group 
Sql :: ver usuarios mysql 
Sql :: raw query must include primary key 
Sql :: mysql date diff in seconds 
Sql :: set username and password for postgresql database 
Sql :: mysql date - 1 day 
Sql :: mysql show table column full description 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =