It’s All Fundamentals

Professional Development
I'm learning how to speak German. Interestingly enough, you don't start off reading dissertations. Instead, you begin by learning the names of things, Teller for plate, Buch for book. The fundamentals. I'm a third degree black belt in Ken Ryu Kenpo. But you don't start that, or continue it, by learning complex kata. Instead, you start with how to make a fist, how to hold your hands up in a defensive stance. The fundamentals. I've been doing crossfit and Olympic weightlifting for a couple of years now. I've been working hard on my clean, standing up tall during the lift, getting my elbows around quick. The fundamentals. Situation after situation, skill set after skill set, you have to get the fundamentals right. And, if you don't get the fundamentals right,…
Read More

sp_updatestats Is Not Smart

SQL Server, T-SQL
No, I don't mean the use of sp_updatestats is not smart. It's a fine, quick mechanism for getting statistics updated in your system. But the procedure itself is not smart. I keep seeing stuff like "sp_updatestats knows which statistics need to be updated" and similar statements. Nope. Not true. Wanna know how I know? It's tricky. Ready? I looked at the query. It's there, in full, at the bottom of the article (2014 CTP2 version, just in case yours is slightly different, like, for example, no Hekaton logic). Let's focus on just this bit: if ((@ind_rowmodctr <> 0) or ((@is_ver_current is not null) and (@is_ver_current = 0))) The most interesting part is right at the front, @ind_rowmodctr <> 0. That value is loaded with the cursor and comes from sys.sysindexes and the rowmodctr column…
Read More