PASS Summit Memories Blog Series – Day 27 – The Mad Scientist

That’s essentially what I consider Itzik Ben-Gan to be, his appearance and accent could be right out of a James Bond movie, or perhaps Phineas and Ferb. Itzik really needs a nickname, too, we should figure something out. I have never had the chance to meet him formally, but when I do I need to have a nickname ready. I am leaning towards the “Cursornator” as a nod to Professor Doofenshmirtz and the nature of the talk I saw back in 2006.

I was already familiar with Itzik but did not own one of his books. I believe I knew of him through magazine articles which seems bizarre to me now – I can’t remember the last time I read a magazine and yet it was something I used to do quite frequently.

Anyway, during this talk in 2006 I watched Itzik talk about how 99% of all cursors could be rewritten using set logic. I suppose the caveat there is that Itzik could rewrite 99% of all cursors, but chances are the hacks working in your shop don’t have quite the same ability as the Cursornator. So, I watched him take this query that was running in 30 seconds and reduce it to run in two seconds. Now, most DBAs like me…they would call it a day. From 30 down to 2? Yeah, it’s beer-thirty at that point, time to move on to the next one.

No, not the Cursornator. He knew the query had more room for improvement, because he knew the amount of logical I/O was still too high. And so after a few more adjustments he got it down to 50ms. And…just to top it off…he also proved to us that this was the fastest this query was ever going to run.

I think the interesting part here is that the PASS Summit is filled with skilled presenters such as Itzik. There are lots of people willing to share their ‘mad scientist’ ways with anyone willing to listen.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.