Question 920
Queries filter millions of product rows by a JSON property and repeatedly scan payloads. What should the SQL developer do FIRST to address the specific issue?
Explanation
Correct Answer
Evaluate supported JSON index or indexed computed-column path for that SQL platform and version. This targets the primary issue because unindexed JSON path predicates can incur expensive row-by-row parsing. Verification: The execution plan uses the chosen path access strategy and returns matching products. Prevent recurrence: Benchmark maintenance overhead and verify deployment-specific feature support.
Incorrect Answers
Parsing nested arrays into typed rows reduces fragile manual string extraction.
A sequence can allocate numbers independently of one table identity property.
Partition elimination can reduce scanned partitions when predicates are sargable.