I have tabular data of 100 Million records, each record having 15 columns.
I need to query 3 columns of this data and filter out the records to be used in further processing.

Currently I'm deciding between two approaches

**Approach 1**
Store the data as a csv or parquet in HDFS. When I need to query read the whole data and query using Spark SQL.

**Approach 2**
Create a Hive table using HiveContext and persist the table and Hive-metadata. Query this table when needed using HiveContext.

Doubts:

1. In Approach 2, is the query pushed to database level(HDFS) and only the records which satisfy the criteria are read and returned? Or the entire data is read into memory(as is the case with most spark jobs) and then query is run using the metadata?
2. Runtime: Of the two approaches, which one will be faster?

Please note that the Hive setup isn't Hive over Spark, it's HiveContext provided with Spark.

Spark Version: 2.2.0