LLearningPath
Analyzing Queries

15% domain · module 1

Photon, Query Profile, and Query Insights

Starts at 2:15:00 in this video — SQL Warehouse full course — profiling (2:15:00)

Photon

Photon is Databricks’ vectorized engine for SQL warehouses (and some Spark workloads). Benefits: faster scans, joins, aggregations on Delta. It is not a dashboard theme and not a UC tag. When a question asks why DBSQL is fast, the stack is Photon + Delta pruning + warehouse, not Oracle-style B-tree indexes by default.

Query Profile

After a statement, open query details → See query profile. You get a DAG with time, rows, peak memory, I/O. Hunt:

  • Exploding joins (row counts jump after a join)
  • Full scans (predicate not on cluster/partition keys)
  • Unnecessary sorts
  • Skew

You typically need to own the query or have Can monitor on the warehouse.

Query Insights

The platform may rank insights (bytes pruned, missing filters). Treat them as hints; still read the DAG. The outline groups Insights and Profiler as how you identify poorly performing queries.

Query profile · Photon

Next module →