When the storage space occupied by table data is large, you can compare the storage space occupied before and after compression by viewing the information on the monitoring interface to confirm the compression effect.
5. Conclusion
In order to verify the application effect of field compression, two scenarios are constructed to conduct comparative experiments.
Scenario 1 is as follows: There are 10,000 rows of data in the table, and each row of data consists of 400 32-bit strings returned by the MD5 function.
Scenario 2 is as follows. 64 tables are imported through sysbench . Each kenya phone number data table contains 10 million rows of data. The data types of the c and pad fields are changed to varchar.
We performed comparative tests in two different scenarios by setting the ` rds_column_compression` parameter to 0 (no compression) and 2 (enable compression) respectively, and keeping other parameters at their default values. The results show that for scenario 1 , the storage size ratio before and after table compression is about 1.8, while for scenario 2, the ratio is about 1.2, and the performance loss after compression is up to about 10%.
This shows that the field compression function of TaurusDB not only supports users to select compression algorithms and other operations according to their needs and implement fine-grained compression strategy adjustments, but also can automatically identify and compress qualified fields, thereby reducing storage costs while avoiding a large number of modifications to business statements. It greatly facilitates users to efficiently compress and store specific fields, and has good practical application value.