Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
None
Description
TokuDB has status to expose the compression ratio:
|
|
mysql> show global status like 'tokudb%COMPRESSION_RATIO';
|
+---------------------------------------+----------+
|
| Variable_name | Value |
|
+---------------------------------------+----------+
|
| Tokudb_LEAF_NODE_COMPRESSION_RATIO | 5.850260 |
|
| Tokudb_NONLEAF_NODE_COMPRESSION_RATIO | 0.564453 |
|
| Tokudb_OVERALL_NODE_COMPRESSION_RATIO | 4.528809 |
|
+---------------------------------------+----------+
|
|
but this a global level ratio, and sometimes the users may be interested
|
in table level compression ratio.
|
|
This patch address this request by exposing FT level compresstion ratio
|
through information_schema.TokuDB_fractal_tree_info table. We add two
|
columns, leaf_compress_ratio and internal_compress_ratio, which indicate
|
the compression ratio of leaf nodes and internal nodes accordingly.
|
|
Limitations, the comppression ratio infos are maintained in memeory, and
|
will lost when server is restarted or ft get evicted from memory.
|
Maybe in future there infos will be persisted in ft file, when this feature
|
is accepted by PerconaFT upstream.
|
https://github.com/alibaba/AliSQL/commit/4ec960a375dc3757a0e8132503e761b2fb6f8f1f