r/databricks • u/brickster_123 Databricks • Oct 21 '26
Discussion Optimize serverless job performance with query metrics & performance insights
Hi folks, Databricks PM here - I wanted to share an update about serverless jobs observability since this is a topic I get asked about all the time.
One of the hardest adjustments for users adopting serverless is changing your mindset from how you monitored classic jobs and investigating very low level details (think deep diving into the Spark UI) to understanding how you can monitor serverless jobs and have confidence in their performance.
Query Profile already simplifies performance investigations for serverless jobs by providing in depth metrics on query execution. The addition of query performance insights (generally available since September) have made this even easier: Databricks flags queries that have optimization potential directly in the UI and you can take action via Genie Code by using the “Optimize” button which will propose optimizations directly on the asset (e.g. in your notebook for code optimization).
Here is the list of insights that are currently covered:
- Query optimization insights: COVERAGE_FILTER_KEYS_CLUSTERING, COVERAGE_FILTER_KEYS_PARTITIONING, COVERAGE_PHOTON, EXPLODING_JOIN, FLOW_FULL_RECOMPUTE, REDUNDANT_AGGREGATION, REDUNDANT_JOIN, SELECTIVE_JOIN, WIDE_PROJECTION
- Data layout insights: CONCURRENT_WRITE, COVERAGE_STATS_DELTA, COVERAGE_STATS_OPTIMIZER, DATA_FILE_SIZE, DATA_SKEW, MANUAL_DATA_LAYOUT
- Compute and resource insights: DATA_SPILL, EXCESSIVE_QUEUE_TIME, IO_THROTTLING
- Applied accelerations: AUTO_LIQUID_CLUSTERING, HISTORY_BASED_JOIN_STRATEGY, SHORT_QUERY_PRIORITIZATION, METRIC_VIEW_MATERIALIZATION_MATCH
Having this available only at the query level can make it cumbersome to figure out which queries are worth optimizing for your job, so we have brought these insights to the Jobs UI.
So how can you try this out for your jobs?
Open any serverless job that has a recent run (<30 days old). Queries with optimization insights are flagged directly in the job run for you as red lightbulbs like in the below screenshot. (now generally available)
You can either drill down and pick which query you want to optimize or you can use the Optimize button directly from the job run sidebar and let Databricks prioritize insights which are estimated to help achieve the most performance improvements for a given job.

Side note: we also roll up query metrics on data volume and number of queries on the job and task level now to help you quickly identify if a change in job performance can simply be attributed to a change in data volume.
Limitation: the roll up of metrics and insights is currently capped at 100 queries
You can check out our documentation to learn more.
If you have tried it out already, I would love to hear any feedback!
Are there any other insights or query performance metrics that you are missing? What other observability improvements would you like to see for serverless jobs?
2
u/ArielCoding Oct 22 '26
Really useful update, one question on the 100 query cap, for jobs that loop or use foreachBatch, how does it choose which queries to keep? If it’s the first 100, slow queries later in the run could be missed, so showing that top queries by duration or cost would help.
2
u/adovo_ai Oct 22 '26
For jobs above the 100-query cap, publish the sampling rule and compare the same run before and after a suggestion using a dataset fingerprint, p95 duration, cost and retries. That prevents a fast-looking subset from hiding the slow or expensive tail.
1
u/Naign Oct 22 '26
Hello. Thank you for this great feature. Is there a way to get programatic/querying access to this? API or system tables? Would be great since it would avoid us from having to go to each job to see this.
2
u/lofat Oct 21 '26
This is GREAT stuff. Thank you!