• Ken Henderson's WebLog

    Regular Expressions in T-SQL

    • 13 Comments
    Given that a recent blog of mine lamented the dangers of using xprocs, I thought it would be a good time to show some of the wonderful stuff you can do thanks to SQL Server extensibility features such as xprocs and COM objects. It’s not that xprocs or...
  • Ken Henderson's WebLog

    T-SQL coding challenge

    • 76 Comments
    This is an oldie, but a goodie. It's an article by Ken Thompson about, among other things, writing self-replicating programs. Thompson is one of my heroes and someone who's had a profound impact on the industry. His list of accomplishments is too long...
  • Ken Henderson's WebLog

    Goodbye, My Friend

    • 55 Comments
    I guess the other shoe has finally dropped at Borland. Chief Scientist Danny Thorpe has left. He jumped ship for Google in December . I received the news with mixed emotions. On the one hand, it’s a terrible, perhaps fatal, loss for Borland. On the other...
  • Ken Henderson's WebLog

    There's no such thing as a query timeout...

    • 5 Comments
    ...not at least as far as the database engine is concerned, anyway. As frequently as the subject of query timeouts comes up with applications based on SQL Server, people are often surprised to learn that query timeouts are a client-side concept only....
  • Ken Henderson's WebLog

    Your opinion on the next edition of my architecture book

    • 26 Comments
    As I think many of you know, I'm updating my SQL Server books for SQL Server 2005. I'm currently wrestling with something that I've decided to put to a vote. The question before me is whether to include the Windows fundamentals coverage that was in the...
  • Ken Henderson's WebLog

    A technique for ensuring plan stability in SQL Server 2000

    • 19 Comments
    One of the great features in SQL Server is its optimizing query processor. The Sybase version of SQL Server pioneered on-the-fly query optimization, and, even to this day, intrinsic query optimization is one of the most useful features of the product...
  • Ken Henderson's WebLog

    Why you shouldn't compress SQL Server data and log files

    • 13 Comments
    Most knowledgable SQL Server DBAs know you shouldn't compress a database's data and log files, but I'll wager that few know the details behind why that's such a bad idea. The general reply might be "Performance" -- and that's correct -- but the assumption...
  • Ken Henderson's WebLog

    Looking for PC QWERTY keyboard piano software

    • 8 Comments
    I used to use a little PC piano program called PianoMan written by Neil Rubenking of PC Magazine fame. I contacted Neil about an update recently, and he tells me that there isn't and won't be one. The main reason is that he wrote the software based on...
  • Ken Henderson's WebLog

    Memory-mapped files and how they work

    • 8 Comments
    A key Windows facility that’s been available since NT shipped is the support of memory-mapped files. A memory-mapped file is a file that has been mapped (i.e., not copied) into virtual memory such that it looks as though it has been loaded into memory...
  • Ken Henderson's WebLog

    Does rebuilding a clustered index rebuild nonclustered indexes?

    • 4 Comments
    This came up yesterday with one of our support engineers, so I thought I’d post a brief entry on it. On SQL Server 2005, using ALTER INDEX…REBUILD to rebuild a clustered index does not rebuild its nonclustered indexes by default. If you think about it...
  • Ken Henderson's WebLog

    A SQL Profiler trace Swiss Army Knife

    • 8 Comments
    Have you ever needed to find your most expensive queries and quickly grew weary of writing T-SQL against trace tables to try to ferret them out? Have you ever had to wade through gigabytes of trace data just to find one ill-behaving query? Have you ever...
  • Ken Henderson's WebLog

    Max worker threads

    • 5 Comments
    Saw an article online the other day that compelled me to respond. The author was suggesting that SQL Server instances with high numbers of user connections would benefit from having their max worker threads setting increased. He tossed around several...
  • Ken Henderson's WebLog

    How to Beat Halo 3 in 20 Minutes

    • 6 Comments
    (Or, How to Beat Its Longest Level, The Covenant, in 20 Minutes and Get the Full 3x Time Bonus) (Or, What I Did On the Day after Christmas) (Or, How to Set a New World Record for Speed Play in Halo 3) Over the recent holiday break I decided to...
  • Ken Henderson's WebLog

    Regular Expressions in T-SQL, Part II

    • 7 Comments
    I've gotten quite a bit of mail from people re: my recent post about regular expression searches in T-SQL . This was actually covered in my last book , so I've been surprised at how many people were unaware that the tools needed to do this were right...
  • Ken Henderson's WebLog

    A poor man's technique for playing DVDs on Media Center eXtenders

    • 4 Comments
    Today’s entry continues the discussion of Windows XP Media Center Edition and details how to play ripped DVDs on Media Center eXtender devices. An MCX device allows you to view content from a computer running Media Center on another TV. The thought is...
  • Ken Henderson's WebLog

    How multiple connections from the same app can kill perf

    • 15 Comments
    It's pretty common for a complex app to make multiple connections to SQL Server. And, on SQL Server 2000 and earlier releases, it's also very easy for those types of app to cause perf problems by distributing their workload across their connections unevenly...
  • Ken Henderson's WebLog

    A WAITFOR UNTIL implentation for T-SQL

    • 2 Comments
    You've probably encountered situations where you needed to pause the execution of a stored procedure until some condition became true or needed to run some code when a condition became true. If the condition is time-based, WAITFOR TIME | DELAY can come...
  • Ken Henderson's WebLog

    64-bit MemToLeave

    • 6 Comments
    Question: On 64-bit SQL Server, which tends to be larger: the Buffer Pool or the MemToLeave region? Because it usually dominates the user mode portion of 32-bit SQL Server's process address space, it might make sense to assume that the BPool is usually...
  • Ken Henderson's WebLog

    TSQL coding challenge

    • 65 Comments
    Today’s entry is another T-SQL puzzle. Steve Kass took the prize for the best solution to my last T-SQL puzzle , and several others came up with some pretty original solutions of their own. I especially liked the ones that were T-SQL specific – ones that...
  • Ken Henderson's WebLog

    More about self-reproducing T-SQL

    • 4 Comments
    In yesterday's entry , I talked about self-replicating programs and how educational it can be to construct them. Commonly known in hacking parlance as quines , these self-reproducing programs force us to think about how our language works and are a good...
  • Ken Henderson's WebLog

    Random thoughts on my trip to the conference

    • 4 Comments
    I had a great time on my brief stint in Denver for the PASS Summit . We had a good session and a good crowd, and Kevin Kline did a marvelous job of running the whole thing. He had lots of great questions for me during the interview, and the crowd had...
  • Ken Henderson's WebLog

    Floating point fun

    • 3 Comments
    I've been an advocate of using SQL Server for more than a mere datastore for about as long as I've been working with the product. Too many times, I've walked into development shops only to discover that they're using SQL Server no differently than they...
  • Ken Henderson's WebLog

    Why .NET is the best thing to happen to software since OOP, Part II

    • 5 Comments
    I didn't really finish the discussion of what I began in this blog , so I'll do so today. Why do I think .NET is the best thing to happen to software since OOP? Several reasons: 1. Based on what the market has said, software for the PC and for Windows...
  • Ken Henderson's WebLog

    Normalizing query text

    • 4 Comments
    A conversation with a friend over email got me to thinking that this info might be useful to a few of you. It’s common for SQL Server application developers to want to “normalize” the query text returned in a Profiler trace such that executions of...
  • Ken Henderson's WebLog

    Sleeping vs. Yielding

    • 11 Comments
    According to the BOL, the recommended way of yielding to other workers in SQLCLR is to call System.Thread.Sleep(0). Long before Yukon shipped, I had a conversation with a coworker who was responsible for knowing something about SQLCLR, and I asked how...
Page 1 of 4 (91 items) 1234