19

How can I view partition details of a table, like how many partitions are there in a table and storage size of each partition?

BinaryButterfly
  • 18,137
  • 13
  • 50
  • 91
Ben
  • 379
  • 1
  • 5
  • 14
  • 3
    found the answer: SELECT * FROM information_schema.partitions WHERE table_name ='table_name' – Ben Aug 26 '14 at 14:34

2 Answers2

61

I recommend using Table Inspector in MySQL Workbench, it gives you lot of useful information including most data related to table partitions.

The data it displays is from the query:

SELECT * FROM information_schema.partitions WHERE TABLE_SCHEMA='your_database' AND TABLE_NAME = 'your_table' AND PARTITION_NAME IS NOT NULL

Abraham Romero
  • 1,047
  • 11
  • 22
7

You can check the INFORMATION_SCHEMA to get this kind of information, try this page: Visit http://dev.mysql.com/doc/refman/5.1/en/partitioning-info.html

vinibarr
  • 500
  • 3
  • 5