You are troubleshooting a high-volume Azure web application that sends telemetry to Application Insights. You need to write a Kusto Query Language (KQL) query to retrieve all failed requests that occurred during the last 24 hours.
Which of the following queries is the most efficient and syntactically correct way to retrieve this data?
- Arequests
| where success == false - Brequests
| where success == false
| where timestamp > ago(24h) - requests
| where timestamp > ago(24h)
| where success == falseCevap - Drequests
| where timestamp > ago(24h) and success = false
Cevap
The query that filters by timestamp first and then by success using double equals is the correct and most efficient choice.
The correct query applies the timestamp filter immediately after referencing the requests table, ensuring that only records from the last 24 hours are scanned. It then correctly uses the double equals operator to check for failed requests.
Adım Adım Çözüm
Anahtar Kavram
Applying time-range filters early in KQL queries to optimize database scanning performance.