SQL Query execution plan explain and optimize the performance for query run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 08:10 AM
When we executing SQL query in databricks SQL warehouse editor what will be best practices to optimize the execution plan and get result faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 09:38 AM
This will mostly depend on the query you are trying to run. Some general optimization recommendations can be found here: https://docs.databricks.com/optimizations/index.html
Additionally, you can also check the SQL plan for factors like Data Skew, type of join etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 06:13 AM
It depends on many different things. For the most part, you don't optimize queries. You can optimize the file layout using optimize/binpacking, bloom filters, and zordering but you can't generate stats or influence the query plan.
The idea of "optimizing" has become a bit of a dated way of thinking. Spark has AQE, CBO, and Catalyst do do much of this work for you. Databricks also adds things like disc caching to help too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2023 10:14 PM
Hi @vinay kumar
Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.
We'd love to hear from you.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2023 10:23 AM
HI @vinay kumar,
Just a friendly follow-up. Did any of the responses help you to resolve your question? if it did, please mark it as best. Otherwise, please let us know if you still need help.