You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Kevin Paul <ke...@gmail.com> on 2014/10/26 04:48:54 UTC

HiveSQL percentile is query slow

Hi all, I tried to run the following sql command in HiveContext with my
table loaded into memory:
  SELECT percentile(myColumn, array(0.1, 0.5)) FROM myTable

The query took more than 5 minutes to complete, but the query like
  SELECT min(myColumn), max(myColumn) FROM myTable
only took around 10 seconds to run.

My Spark version is 1.2.0 SNAPSHOT, the cluster is 10 slaves, and the
dataset is 10G, and I'm running on Yarn-client mode.
The query took two stages to run:
 1st. is mapPartitions at Exchanged.scala:86  with duration 9s
 2nd. is collect at SparkPlan.scala: 85 with duration 5.3 min

I attach the Summary Metrics for the collect task here
[image: Inline image 2]
Thanks,
Kevin Paul