A data compression method, comprising: obtaining a to-be-compressed object, wherein the to-be-compressed object is a data unit among a plurality of data units, the plurality of data units obtained by splitting to be compressed data in a data table, wherein the data table is a data table of a distributed relational database of a log-structured merge-tree, LSM tree, architecture which needs to be compressed as part of a compaction process of the data table according to the LSM tree architecture; obtaining access requirement information of the to-be-compressed object, wherein the access requirement information is related to decompression efficiency of the to-be-compressed object and is determined by obtaining historical access data of the to-be-compressed object, the historical access data including a historical access frequency, wherein, when the historical access data indicate that the to-be-compressed object is frequently accessed, a high access requirement is set for the to-be-compressed object, the high access requirement indicating a high decompression efficiency of the to-be-compressed object and, when the historical access data indicate that the to-be-compressed object is rarely accessed, a low access requirement is set for the to-be-compressed object, the low access requirement indicating a low decompression efficiency of the to-be-compressed object; searching a recommendation record for whether a recommended compression coding rule that meets a compression rate condition exists, the recommendation record being used to record a compression coding rule of a historical compressed object and corresponding compression rate information, the historical compressed object being another data unit among the plurality of data units that has been already compressed, wherein the compression rate condition includes the condition that compression rate information of the recommended compression coding rule is higher than a specified threshold and the condition that the compression rate information of the recommended compression coding rule matches the access requirement information; if the recommended compression coding rule that meets the compression rate condition exists, compressing the to-be-compressed object by using the recommended compression coding rule; and if the recommended compression coding rule that meets the compression rate condition does not exist, starting a regular compression coding process to obtain estimated compression rates of a plurality of compression coding rules for the to-be-compressed object, selecting a target compression coding rule based on at least the estimated compression rates, and compressing the to-be-compressed object by using the target compression coding rule. obtaining a to-be-compressed object, wherein the to-be-compressed object is a data unit among a plurality of data units, the plurality of data units obtained by splitting to be compressed data in a data table, wherein the data table is a data table of a distributed relational database of a log-structured merge-tree, LSM tree, architecture which needs to be compressed as part of a compaction process of the data table according to the LSM tree architecture; obtaining access requirement information of the to-be-compressed object, wherein the access requirement information is related to decompression efficiency of the to-be-compressed object and is determined by obtaining historical access data of the to-be-compressed object, the historical access data including a historical access frequency, wherein, when the historical access data indicate that the to-be-compressed object is frequently accessed, a high access requirement is set for the to-be-compressed object, the high access requirement indicating a high decompression efficiency of the to-be-compressed object and, when the historical access data indicate that the to-be-compressed object is rarely accessed, a low access requirement is set for the to-be-compressed object, the low access requirement indicating a low decompression efficiency of the to-be-compressed object; searching a recommendation record for whether a recommended compression coding rule that meets a compression rate condition exists, the recommendation record being used to record a compression coding rule of a historical compressed object and corresponding compression rate information, the historical compressed object being another data unit among the plurality of data units that has been already compressed, wherein the compression rate condition includes the condition that compression rate information of the recommended compression coding rule is higher than a specified threshold and the condition that the compression rate information of the recommended compression coding rule matches the access requirement information; if the recommended compression coding rule that meets the compression rate condition exists, compressing the to-be-compressed object by using the recommended compression coding rule; and if the recommended compression coding rule that meets the compression rate condition does not exist, starting a regular compression coding process to obtain estimated compression rates of a plurality of compression coding rules for the to-be-compressed object, selecting a target compression coding rule based on at least the estimated compression rates, and compressing the to-be-compressed object by using the target compression coding rule.