[ https://issues.apache.org/jira/browse/SPARK-6910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14957194#comment-14957194 ]
Cheolsoo Park commented on SPARK-6910: -------------------------------------- You're right that 2nd query is faster because the table/partition metadata is cached. Particularly, if you set {{spark.sql.hive.metastorePartitionPruning}} false (by default, false), Spark will cache metadata for all the partitions and any query against the same table will run faster even with a different predicate. See relevant code [here|https://github.com/apache/spark/blob/master/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala#L830-L839]. > Support for pushing predicates down to metastore for partition pruning > ---------------------------------------------------------------------- > > Key: SPARK-6910 > URL: https://issues.apache.org/jira/browse/SPARK-6910 > Project: Spark > Issue Type: Sub-task > Components: SQL > Reporter: Michael Armbrust > Assignee: Cheolsoo Park > Priority: Critical > Fix For: 1.5.0 > > -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org