mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 05:36:00 +00:00
Show table size fo MySQL and Postgres #552
This commit is contained in:
@@ -3,6 +3,7 @@ select
|
||||
TABLE_NAME as pureName,
|
||||
TABLE_TYPE as objectType,
|
||||
TABLE_ROWS as tableRowCount,
|
||||
DATA_LENGTH + INDEX_LENGTH as sizeBytes,
|
||||
case when ENGINE='InnoDB' then CREATE_TIME else coalesce(UPDATE_TIME, CREATE_TIME) end as modifyDate
|
||||
from information_schema.tables
|
||||
where TABLE_SCHEMA = '#DATABASE#'
|
||||
|
||||
@@ -4,6 +4,7 @@ select
|
||||
TABLE_ROWS as tableRowCount,
|
||||
ENGINE as tableEngine,
|
||||
TABLE_COMMENT as objectComment,
|
||||
DATA_LENGTH + INDEX_LENGTH as sizeBytes,
|
||||
case when ENGINE='InnoDB' then CREATE_TIME else coalesce(UPDATE_TIME, CREATE_TIME) end as modifyDate
|
||||
from information_schema.tables
|
||||
where TABLE_SCHEMA = '#DATABASE#' and (TABLE_TYPE='BASE TABLE' or TABLE_TYPE='SYSTEM VERSIONED') and TABLE_NAME =OBJECT_ID_CONDITION;
|
||||
|
||||
Reference in New Issue
Block a user