Does Databricks get cached result for a subquery?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 02:27 PM
If I run a query as "SELECT fare_amount FROM nyctaxi.trips where fare_amount > 1.5". The query results will be cached for 24 hours.
I then compose a second query using the previous query as a subquery "SELECT * FROM nyctaxi.trips WHERE fare_amount IN (SELECT fare_amount FROM nyctaxi.trips where fare_amount > 1.5)"
Will Databricks get the cached result for the subquery to speed up the second query execution?
Note that the ask is not to cache subquery result. Rather, to get the cached result for the subquery when the subquery was run independently before