select sum(DATA_LENGTH)+sum(INDEX_LENGTH) from information_schema.tables where table_schema='数据库名字';数据库
information_schema库中包含了对整个数据库的不少统计信息,能够经过查看它们,来获得数据库相关的信息orm