// show partitions in database
SELECT TABLE_NAME, PARTITION_NAME FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA = 'db_name' ;
// show partition type
SHOW CREATE TABLE tbl_name;
// show table partition size
SELECT PARTITION_ORDINAL_POSITION, TABLE_ROWS, PARTITION_METHOD
FROM information_schema.PARTITIONS
WHERE TABLE_SCHEMA = 'db_name' AND TABLE_NAME = 'tbl_name';
References :
database - How to see table partition size in MySQL ( is it even possible? ) - Stack Overflow
mysql - Can i view tables which are under Partition in my sql - Stack Overflow
沒有留言:
張貼留言