MatBailie
  • Member for 9 years, 11 months
  • Last seen this week
3 answers
4 votes
9k views
Stored procedure executes too long
4 votes

Take care when comparing stored procedure execution times to inline SQL execution times. A stored procedure gets compiled into ONE execution plan to fit all possible parameters. Depending on your ...

View answer
2 answers
5 votes
1k views
Does a cluster index provide more benefits than pre-sorting the load file and creating non-cluster index?
2 votes

The order you insert data into a table does not guarantee the order of the data on this disk. Even if the order happens to be as you wish, it's not structured in a way that the optimiser will know ...

View answer
1 answers
4 votes
352 views
MySQL: A better way to write this query?
1 votes

Note: 1 + 1 + NULL = NULL For this reason I'd change one part... SUM(CASE WHEN e.oiPost = 1 THEN 1 WHEN e.oiPhone = 1 THEN 1 WHEN e.oiEmail = 1 THEN 1 ...

View answer