THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

John Paul Cook

A Full Table Scan Good for a Lifetime

How many people can say that they’ve done a manual full table scan for their valentine? I can.

When I first met my wife, she introduced herself as “[FirstName] +  [LastName]”, however my brain encountered an “OH, WOW!” error and stopped processing after her [FirstName]. I didn’t want to ask her or anybody else what her [LastName] was, lest she think I wasn’t paying enough attention to remember (when, really, the exact opposite was true). In today’s high-tech world, this would not have been a problem, but we met long before the internet and search engines.

Over the next few months, I saw my wife many times at church and at school (I was a graduate student; she was on staff). But never was her [LastName] again presented to me. One day, she stopped by my townhouse when I wasn’t home. She left a note that only said “Call me.”, followed by her [PhoneNumber] and her [FirstName]. I wanted to keep my secret safe, so I had only one option – the phone book. I spent the next several hours conducting a manual scan of the Galveston white pages. I started on the first page and just kept reading until I found her phone number. It appeared in the W’s. At last armed with the knowledge of my valentine’s [LastName], I made the call.

We’ve been married over 25 years now.

Published Saturday, February 14, 2009 1:37 AM by John Paul Cook
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

jacobsebastian said:

Congratulations John!

I am pretty sure this table scan is much memorable than an index-seek.

Regards

Jacob

February 14, 2009 8:24 AM
 

Bernd Eckenfels said:

This is so sweet. But.. umm... uh... your.. secret... it is now not secret anymore :)

February 14, 2009 1:24 PM
 

jchang said:

this is precisely the reason SQL Server needs correlated column statistics (it does at the vector level, but not at the histogram).

so then men know that

SELECT * FROM Women

WHERE Attractiveness > 9 AND MonthlyShoppingExpenses < $3000

and women know that

SELECT * FROM Men

WHERE FinancialStability > 9 AND Fidelity > 9 AND IsSingle > 50%

all yield zero or nearly zero rows.

The individual column statistics may indicate 10% on each column condition, leading one to think that the combined AND conditions yields 1%, which will still have a respectable row count output, when in fact, if correlation is taken into account, a drastically different row count.

Yes, I know, get a life, and I have been called MCP before the MS MCP program existed.

February 16, 2009 10:42 AM
 

Val Intyne said:

Gee, not much has changed in 25 years!

February 26, 2009 12:07 AM
 

Jamie Hudson said:

Awe - I love a good love story. Thanks John.

February 15, 2012 11:41 PM

Leave a Comment

(required) 
(required) 
Submit

About John Paul Cook

John Paul Cook is both a Registered Nurse and a Microsoft SQL Server MVP experienced in Microsoft SQL Server and Oracle database application design, development, and implementation. He has spoken at many conferences including Microsoft TechEd and the SQL PASS Summit. He has worked in oil and gas, financial, manufacturing, and healthcare industries. Experienced in systems integration and workflow analysis, John is passionate about combining his IT experience with his nursing background to solve difficult problems in healthcare. He sees opportunities in using business intelligence and Big Data to satisfy healthcare meaningful use requirements and improve patient outcomes. John graduated from Vanderbilt University with a Master of Science in Nursing Informatics and is an active member of the Sigma Theta Tau nursing honor society. Contributing author to SQL Server MVP Deep Dives and SQL Server MVP Deep Dives Volume 2.

This Blog

Syndication

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement