UKG interview question

How do you debug a slow SQL query?