Skip to interview prep
Apexed

68. A query became slow after the table grew, although its SQL did not change. What evidence would you collect?

MediumDatabases

Technical
Show model answer

Capture a representative query plan, parameter values and timing while protecting sensitive data. Compare estimated and actual row counts where supported, access paths, joins, sorting, lock waits and the volume returned to the application.

Check data distribution, statistics and indexes before choosing a remedy. Test a proposed index or query change with representative reads and writes; speeding one query can add write cost or worsen another workload. Verify under similar load before concluding.

What interviewers listen for

  • Inspect the execution plan
  • Consider data distribution
  • Measure read and write effects
A query became slow after the table grew, although its SQL did not change. What evidence would you collect — Software engineering interview question — Apexed