title: Which One is faster? Spark SQL with Where clause or Use of Filter in Dataframe after Spark SQL
body: <p>Which One is faster? Spark SQL with Where clause or Use of Filter in Dataframe after Spark SQL?</p>
  
  <p>Like Select col1, col2 from tab 1 where col1=val;</p>
  
  <p>Or</p>
  
  <p>dataframe df=sqlContext.sql(Select col1, col2 from tab 1);</p>
  
  <p>df.filter("Col1=Val");</p>