How do you find and fix a slow query?

2 stars Asked often.

In one or two sentences
Find it through slow query records, see where the time goes in the execution plan, fix the index or the query shape, then measure again to confirm.

Think of your own answer first

Say it out loud, or type it below. What you type never leaves this device.

Follow-up questions

These are likely next questions from an interviewer. Think of your answer first, then press the button.

  1. 1 / 3

    What is the N+1 problem?

Sources checked