apache-spark - 字符串分区键与整数分区键的 Hive/Impala 性能

标签 apache-spark hive impala

是否建议将数字列用于分区键?当我们对数字列分区和字符串列分区进行选择查询时,性能会有什么不同吗?

最佳答案

好吧,如果您查看 Impala 官方文档,情况会有所不同。

我不会详细说明,而是粘贴文档中的部分,因为我认为它很好地说明了这一点:

"Although it might be convenient to use STRING columns for partition keys, even when those columns contain numbers, for performance and scalability it is much better to use numeric columns as partition keys whenever practical. Although the underlying HDFS directory name might be the same in either case, the in-memory storage for the partition key columns is more compact, and computations are faster, if partition key columns such as YEAR, MONTH, DAY and so on are declared as INT, SMALLINT, and so on."



引用:https://www.cloudera.com/documentation/enterprise/5-14-x/topics/impala_string.html

关于apache-spark - 字符串分区键与整数分区键的 Hive/Impala 性能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52082114/

相关文章:

hadoop - 从其他Blob容器在HDInsight中创建Hive表时出错:路径不合法

java - 使用java向impala表中插入数据

numpy - spark-submitting 时没有名为 numpy 的模块

mysql - 无法使用 jdbc 和 Spark 连接器从 databricks 群集连接到 Azure Database for MySQL 服务器

apache-spark - 打印 ResultIterable 对象的内容

java - 错误: java heap space on Google Data-Proc Cluster

hadoop - hive - double

mysql - hive-metastore 无法在 cloudera manager 安装过程中启动

select - (黑斑羚)分析异常 : Subqueries are not supported in the select list

scala - 从数据帧制作 avro 模式 - spark - scala