Practice Exam

Question 40 of 75

Evaluate KQL Query Optimization Approach

You work for MDFT Pro, a well-known training agency that operates IoT-enabled smart classrooms across multiple campuses. Mark, a Real-Time Analytics Specialist at MDFT Pro, manages a KQL database that tracks environmental conditions in classrooms to ensure optimal learning environments. The database contains two tables: Stream (with millions of streaming sensor readings including timestamp, geolocation, temperature, and device ID from classroom sensors) and Reference (with device information mapping device IDs to classroom names and locations). Mark has written a KQL query that joins these tables, extracts latitude and longitude from geolocation data, filters for temperatures above 10 degrees, and renders the results on a map. However, the query takes too long to execute because it processes millions of rows through the join operation before applying the temperature filter. A colleague suggests adding the make_list() function to aggregate the output columns, claiming this will reduce processing time by grouping the results.

The current query is:

Stream
| extend lat = todecimal(GeoLocation.Latitude), long = todecimal(GeoLocation.Longitude)
| join kind = inner Reference on DeviceId
| project Timestamp, lat, long, Temperature, DeviceName
| filter Temperature >= 10
| render scatterchart with (kind = map)

Does adding the make_list() function to the output columns meet the goal of reducing query execution time?

Choose the correct answer from the options below.

Explanations for each answer:

Learn more about KQL query optimization:
KQL Query Optimization
Next Question
Discuss this question on social media: