Problem: that how to calculate the space occupied by the table size by each user? How to monitor each user changes the size of a table space occupied? Such as table testA, to calculate each user space occupied testA table size, monitor occupies changes the size of a table space, how to achieve this?
Now think of plan: can use Java fields and table field mapping relationship to do ah? Is using Hibernate in the platform, Java objects and database tables are one-to-one, first get Java objects, the length of each field, and then according to this article (http://blog.csdn.net/J080624/article/details/52875344) field size for conversion, record each row corresponds to a tenant, in this way to get to insert the size of one row, then obtain corresponding to the tenant of all sizes, this scheme is feasible, please?
CodePudding user response:
Information_schema. ` TABLES `Mysql has a similar dynamic view of oracle table, the table above information with table takes up space inside,
CodePudding user response: