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 :: MYSQL HOT TO COUNT THE DURATION BETWEEN TWO DATES 
Sql :: delete a record from a table sqlite3 
Sql :: sqlite drop table 
Sql :: oracle search in date columns 
Sql :: how to use a database to see tables mysql 
Sql :: t sql to rebuild all indexes in a database 
Sql :: create unique index postgres 
Sql :: oracle auto_increment 
Sql :: sql create a new table 
Sql :: mssql find deadlocks 
Sql :: SELECT table_name FROM user_tables; 
Sql :: pl sql disable trigger 
Sql :: ORA-00942 
Sql :: sql add column after another column 
Sql :: mysql query bulk insert 
Sql :: sql string data type 
Sql :: drop index oracle 
Sql :: select and condition in sql 
Sql :: create table in mysql 
Sql :: how to print mysql query of codeigniter query builder 
Sql :: postgresql dump and restore db 
Sql :: ignore case like sql 
Sql :: search for replace in mysql 
Sql :: check constraint in sql 
Sql :: sql query to list all tables in a database sql server 
Sql :: how to drop a table in mysql 
Sql :: mysql utc timestamp 
Sql :: select new table sql 
Sql :: postgres list databases 
Sql :: postgresql resolv duplicate value violates unique constraint 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =