Using the explain method to view the physical plan is a good way to determine performance.
For example, the Zeppelin Tutorial tutorial.
sqlContext.sql("select age, job from bank").filter("age = 30").explain
AND
sqlContext.sql("select age, job from bank where age = 30").explain
Has exactly the same physical plane.
== Physical Plan == Project [age
Thus, performance should be the same.
In my opinion, select age, job from bank where age = 30 more readable in this case.
source share