Contoso has an Azure subscription in North Europe that contains the corporate infrastructure. The current infrastructure contains a Microsoft SQL Server 2017 database. The database contains the following tables.
The FeedbackJson column has a full-text index and stores JSON documents in the following format.
The support staff at Contoso never has the unmask permission.
Requirements
Contoso is deploying a new Azure SQL database that will become the authoritative data store for the following;
Sometimesthe ingestion pipeline fails due to malformed JSON and duplicate payloads.
The engineers at Contoso report that the following dashboard query runs slowly.
SELECT VehicleTd, Lastupdatedutc, EngineStatus, BatteryHealth FROM dbo.VehicleHealthSumary where fleetld- gFleetld ORDER BV LastUpdatedUtc DESC;
You review the execution plan and discover that the plan shows a clustered index scan.
vehicleincidentReports often contains details about the weather, traffic conditions, and location. Analysts report that it is difficult to find similar incidents based on these details
Planned Changes
Contoso wants to modernize Fleet Intelligence Platform to support Al-powered semantic search over
incident reports.
Security Requirements
Contoso identifies the following telemetry requirements:
• Telemetry data must be stored in a partitioned table.
• Telemetry data must provide predictable performance for ingestion and retention operations.
• latitude, longitude, and accuracy JSON properties must be filtered by using an index seek.
Contoso identifies the following maintenance data requirements:
• Ensure that any changes to a row in the MaintenanceEvents table updates the corresponding
value in the LastModif reduce column to the time of the change.
• Avoidrecursive updates.
AI Search, Embedding’s, and Vector indexing
The development learn at Contoso will use Microsoft Visual Studio Code and GitHub Copilot and will
retrieve live metadata from the databases. Contoso identifies the following requirements for
querying data in the FeedbackJson column of the customer-Feedback table:
• Extract the customer feedback text from the JSON document.
• Filter rows where the JSON text contains a keyword.
• Calculate a fuzzy similarity score between the feedback text and a known issue description.
• Orderthe results by similarity score, with the highest score first
View Mode
Q: 15
DRAG DROP You have a SQL database in Microsoft Fabric that contains a table named WebSite. Logs. WebSite.Logs stores application telemetry data. Website.Logs contains a nvarehar(iMx) column named log that stores JSON documents You have a daily report that filters by the $.severity JSON property and returns Logld. LogDateTime, and log. The report frequently causes full table scans. You need to modify Website. Logs to support efficient filtering by $. severity and avoid key lookups for the columns returned by the report. How should you complete the Transact-SQL code to avoid full table scans? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point.
Drag & Drop
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
Answer Area
Target 1: B. AS JSON VALUE([log], '$.severity') PERSISTED
Target 2: D. INCLUDE (LogId, LogDateTime, [log])
Explanation
To optimize queries filtering by JSON properties, you must expose the scalar JSON property as a computed column. The JSON_VALUE function is used specifically to extract scalar values (like a severity level) from a JSON document, whereas JSON_QUERY extracts objects or arrays. Marking the computed column as PERSISTED physically stores the data, which guarantees indexability.
To prevent key lookups, you must create a "covering index." A key lookup occurs when a nonclustered index does not contain all the columns requested by the query, forcing the engine to retrieve the missing columns from the base table. By using the INCLUDE clause to append LogId, LogDateTime, and log, the index can satisfy the entire daily report directly, thereby eliminating full table scans.
References
Microsoft Learn: "Index JSON data in SQL Server" * Section: "Create a computed column" & "Create an index on the computed column."
Detail: Explains that to efficiently index JSON, you use JSON_VALUE to create a computed column (often persisted) and then build a nonclustered index on it.
Microsoft Learn: "Create indexes with included columns"
Section: "Using included columns to avoid key lookups."
Detail: Details how adding non-key columns to the leaf level of a nonclustered index via the INCLUDE clause creates a covering index, significantly improving query performance by eliminating the need for base table key lookups.