==========不多说,上干货==========
Which two methods will provide the total number of partitions on a table?
#哪两种方法将提供表上的分区总数?
1. use the command: show create table
#使用命令:show create table
2. Query the INFORMATION_SCHEMA.PARTITIONS table
#查询INFORMATION_SCHEMA.PARTITIONS表
==========================
Which two methods accurately monitor the size of your total database size over time?
#哪两种方法可以准确地监控一段时间内数据库总大小?
1. monitoring the information_schemA.TABLES table
#监控information_schemA.TABLES表
2. monitoring datadir size in the operating system
#监控操作系统中的datadir大小
==========================
Mysql > SELECT FILE_NAME, TOTAL_EXTENTS * EXTENT_SIZE AS `size`
-> FROM INFORMATION_SCHEMA.FILES
-> WHERE FILE_NAME LIKE ‘%employees%’;
查询数据库employees下各个table,对应的表空间的大小。
==========End,=============
本文介绍了两种获取表分区总数的方法:使用show createtable命令和查询INFORMATION_SCHEMA.PARTITIONS表;并提供了两种监控数据库总大小随时间变化的方式:监控information_schema.tables表和监控操作系统中的datadir大小;最后展示了如何查询特定数据库下各表对应表空间的大小。
794

被折叠的 条评论
为什么被折叠?



