
# Hive ORC数据存储优化
#### 操作场景
"ORC"是一种高效的列存储格式，在压缩比和读取效率上优于其他文件格式。
建议使用"ORC"作为Hive表默认的存储格式。
#### 前提条件
已登录Hive客户端，具体操作请参见[Hive客户端使用实践](https://support.huaweicloud.com/cmpntguide-mrs/mrs_01_0952.html)。
#### 操作步骤
- 推荐：使用"SNAPPY"压缩，适用于压缩比和读取效率要求均衡场景。 **Create table *xx* *(col_name data_type)* stored as orc tblproperties ("orc.compress"="SNAPPY")** **;**
  
- 可用：使用"ZLIB"压缩，适用于压缩比要求较高场景。 **Create table *xx* *(col_name data_type)* stored as orc tblproperties ("orc.compress"="ZLIB")** **;**
  
![](https://support.huaweicloud.com/cmpntguide-mrs/public_sys-resources/note_3.0-zh-cn.png)
xx为具体使用的Hive表名。
