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. dewitte says:

    Well, it took me a minute. 🙂

  2. 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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

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

Join 1,664 other followers

Follow me on Twitter

ToadWorld Pro of the Month November 2013
%d bloggers like this: