hive分区表实践
HIVE把表组织成“分区”,这是一种根据“分区列”的值对表进行粗略划分的机制,使用分区可以加快数据分片的查询速度。 表或分区可以进一步分为“桶”。它会为数据提供额外的结构以获得更高效的查询处理。 创建分区表 1 2 3 4 CREATE TABLE bills_detail(msgidSTRING, time STRING,spidSTRING,opidSTRING,spcodeSTRING,resultSTRING) PARTITIONED BY (dtSTRING,typeSTRING) ROWFORMATDELIMITED FIELDSTERMINATED BY '\t' 表结构 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 hive> desc bills_detail; OK msgidstring time string spidstring opidstring spcodestring resultstring dtstring typestring #PartitionInformation #col_namedata_...