Hi, Just wondering if you can try this:
val obj = sql("select manufacturer, count(*) as examcount from pft group by manufacturer order by examcount desc") obj.collect() obj.queryExecution.executedPlan.executeCollect() and time the third line alone. It could be that Spark SQL taking some time to run the optimizer & generate physical plans that slows down the query. Thanks, Zongheng On Wed, Jun 4, 2014 at 2:16 PM, ssb61 <santoshbalma...@gmail.com> wrote: > > > > > -- > View this message in context: > http://apache-spark-user-list.1001560.n3.nabble.com/SQLContext-and-HiveContext-Query-Performance-tp6948p6976.html > Sent from the Apache Spark User List mailing list archive at Nabble.com.