Details
-
New Feature
-
Status: Done
-
High
-
Resolution: Fixed
-
5.7.23-23, 8.0.12-2rc1
Description
Column Families in MyRocks maintain their own mem-table and are always open. Mem-tables consume a fair amount of memory outside of the block cache. Since the creation of a Column Family has a direct impact on the memory footprint of the mysqld process, users should not always have unrestricted, free-reign to implicitly create column families at will. Consider the following example:
CREATE TABLE t1( a INT, b INT, c INT, d INT, PRIMARY KEY(a) COMMENT 'the primary key', KEY ab(a,b) COMMENT 'key ab', KEY bc(b,c) COMMENT 'key bc', KEY cd(c,d) COMMENT 'key cd', KEY abcd(a,b,c,d) COMMENT 'key abcd') ENGINE=ROCKSDB;
This will result in MyRocks creating Column Families by the names of:
- 'the primary key'
- 'key ab'
- 'key bc'
- 'key cd'
- 'key abcd'
The fact that any index comment will result in a new column family is a different problem unto itself (see PS-4947), but, this now can not be changed in 5.7. Regardless, even if the intention was to create a new column family, due to the impact on the required resources, it should be a managed/privileged option at the minimum controlled by a read only server variable.