Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TiDB如何设置表压缩算法
Requirement: Some historical tables, hoping to set a higher compression rate algorithm to save some storage space.
Is this reply reliable? 
Official website:
CREATE TABLE | PingCAP 文档中心
It states that the compression parameter will be ignored.
TiDB supports the following table_option
. TiDB will parse and ignore other table_option
parameters, such as AVG_ROW_LENGTH
, CHECKSUM
, COMPRESSION
, CONNECTION
, DELAY_KEY_WRITE
, ENGINE
, KEY_BLOCK_SIZE
, MAX_ROWS
, MIN_ROWS
, ROW_FORMAT
, and STATS_PERSISTENT
.
TiDB probably doesn’t support it. Don’t believe the nonsense from ChatGPT.
Currently, TiDB only offers compression options for different levels in RocksDB, and does not have compression configuration capabilities at the library or table level.
TiKV sets the compression for different levels through the configuration parameter compression-per-level
:
- Default compression algorithm for each level.
- Default values for
defaultcf
: [“no”, “no”, “lz4”, “lz4”, “lz4”, “zstd”, “zstd”]
- Default values for
writecf
: [“no”, “no”, “lz4”, “lz4”, “lz4”, “zstd”, “zstd”]
- Default values for
lockcf
: [“no”, “no”, “no”, “no”, “no”, “no”, “no”]
ChatGPT is really going to be ruined by you guys.
ChatGPT can’t resist the interrogation 
ChatGPT was taken down by you just like that?
Read the documentation. You’re asking ChatGPT for this?
It might still be a bit challenging for ChatGPT to handle technical issues, right?
The image you provided is not accessible. Please provide the text you need translated.