Help me please my data’s fried
My manager is fuming
My users just cannot get in
Its very time-consuming
Resources have all gone to pot
My memory has amnesia
The processor is eaten up
And the network is freezing!
Our data feeds are going slow
And inserts do not happen
Our dashboards are not up to date
Yeah – Someone’s for a slappin’
Infrastructure took a look,
And bought some new equipment
They assured me things would go
At lightspeed, in an instant
We got a team and hauled it in
New servers, SAN and Rack
We moved the database and app
Improvement? – not jack.
Infrastructure bought some more
Disks, solid state and all
And memory, upgraded to the max
Things better? Not at all
Ah now they said, we have instead
Bought Fusion IO
They plugged it in, it was a SIN
Performance gain? NO
They asked their devs to take a look
They said it was the SQL
And that it was above their heads
So then they called us people
In we went to take a look
Your database size?, we asked
There was a pause, a big deep breath
A GIGABYTE they gasped
Quite curiously, I gazed
Upon their stored procedure
It was quite long, I will admit
I nearly had a seizure!
With UDF’s, temp tables
And cursors abounding
Trigger-Happy to be sure
It really was astounding!
I took a look at their IO
T’was something like the matrix
Covering Indexes? Not a one
The scanning was CRAZY!
Non-sargable, crossed numa nodes
Blown cache, both plan and dough
A total mess – is this a test?
It really can’t be so!
Using Dynamic SQL doesn’t always perform
And no param’s is not the norm!
So what to do that is the question?
Maybe they’d take a small suggestion?
When your data fits on a memory stick
More hardware’s unlikely to do the trick!!