The words for that song I did at the PASS Summit 2011 are as follows. On the Friday, I stopped where the bridge starts. Various recordings of it are making it to YouTube, such as here, where the song starts around 2:20 in.
I should've looked the other way
Verse 1:
My query sucks - it takes too long
So long I wrote this song
The plan's not big - it ain't a giant
And yet I have an angry client
Performance now has made her weary
So I've come in to fix her query
I promise I won't ever fail her
Say "Trust me, love, I'm from Australia!"
Chorus:
I need to find you
But I don't want to search every row
My predicate's residual
My seek just runs too slow
I thought I'd caught a glimpse of you
Been searching for all day
But all along, I'd done it wrong
I should've looked the other way
Verse 2:
A trace is on, I know the reads
That fetch the bytes the query needs
There's spooling from a CTE
They've got recursion needlessly
I need to dig a little further
I worry there might be a cursor
The DBA has the plan_handle
He says it's not corrupt, he knows Paul Randal!
Repeat chorus
Bridge:
There is an index covering predicates with keys
But my developer has used inequalities
There is a range scan
Hiding truth
Hiding cost
Hiding you...
Repeat chorus x2
I should've looked the other way
© 2011 Rob Farley ;)
@rob_farley