Hidden code in AdventureWorks

4

April 1, 2016 by Kenneth Fisher

I’ve playing around with AdventureWorks and managed to found some hidden code! Truly odd stuff. I’m so shocked I couldn’t wait until the time I usually post.

So if you take the x character of the first character column of each table (where x is object_id % len(column) ), merge them all together and sort based on the last int column then about half way down you will see the following:

OPTION (Bill_640kb_Gates)

I did some tests and from what I can tell if you use this option on any query it causes the memory grant to be exactly 640kb.

Not really all that useful but I’m going to keep looking and see if I can find anything else.

4 thoughts on “Hidden code in AdventureWorks

  1. I. M. Fletcher's avatar dewitte says:

    Well, it took me a minute. πŸ™‚

  2. James's avatar James says:

    I didnt see this until the 2nd April so of course I spent a good few minutes checking it out

Leave a reply to James Cancel reply

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

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 3,976 other subscribers

Follow me on Twitter

Archives

ToadWorld Pro of the Month November 2013