彩38完整修复运营版+H5自适应手机版

dirpath 是一个string,代表目录的路径,
dirnames 是一个list,包含了dirpath下所有子目录的名字。
filenames 是一个list,包含了非目录文件的名字。
这些名字不包含路径信息,如果需要得到全路径,需要使用os.path.join(dirpath, name).

                                                                                                                      彩38完整修复运营版+H5自适应手机版

<br>
查看表的容量大小
mysql> use information_schema;
select data_length,index_length
from tables where
table_schema='test'
and table_name = 'test_table';

#字节转MB
select concat(round(sum(data_length/1024/1024),2),'MB') as data_size_mb,
concat(round(sum(index_length/1024/1024),2),'MB') as index_size_mb
from tables where
table_schema='test'
and table_name = 'test_table';


查看库的容量大小
select TABLE_SCHEMA, concat(truncate(sum(data_length)/1024/1024,2),' MB') as data_size,
concat(truncate(sum(index_length)/1024/1024,2),'MB') as index_size
from information_schema.tables
group by TABLE_SCHEMA
order by data_length desc;

猜你喜欢

转载自www.cnblogs.com/wwt2171793408/p/9168445.html
今日推荐