February 2008 Blog Posts
It does when it feels like it, but not in the way you immediately think of.
A few days ago Jeff posted about short-circuiting wondering how it works and since I've played with this a long while ago I thought I'd share my results. Hopefully it will make it clearer how SQL Server behaves when evaluating conditions in its WHERE clause. So let's see how it's done in greater detail.
First we must create our test table with some sample data which will be defined like this:
IF OBJECT_ID('t1') IS NOT NULL
DROP TABLE t1
CREATE TABLE t1(id INT PRIMARY...
We all heard about the Chuck Norris Facts, right?
Well if you're a fan of security you have to be familiar with Bruce Schneier and his excellent blog.
What I didn't know is that he also has a collection of facts!
Just how cool is that???
Here are some I found funny:
- For Bruce Schneier, SHA-1 is merely a compression algorithm.
- Bruce Schneier once compressed a single bit of information to half its size.
- Bruce Schneier doesn't need backups because his hard drive knows that failure is not an option.
- Bruce Schneier shaves with Occam's razor.
- Bruce Schneier knows the last digit of...
This is an implementation of the Grayscale Immersion Watershed Segmentation in C# based on the
Vincent-Soille immersion watershed algorithm
Read Full Post.
I've written an article here on SQL Team about Integrating Profiler and PerfMon Log Files.
Troubleshooting SQL Server requires the use of both PerfMon (Performance/System Monitor) and SQL Trace files created by SQL Profiler or directly by SQL Server trace. Analysis of the gathered data is much easier if you can correlate your trace file with the PerfMon counters. In this article I'll show how to create a PerfMon counters log file and SQL Profiler Trace file, how to read them both and how to correlate the two files in SQL Profiler.
Integrating Profiler and PerfMon Log Files
Probably everyone is familiar with the Count(*) function in SQL Server.
But there seems to be a great deal of confusion amongst youngsters (SQL wise) about how all its possible options work.
Let us banish the confusion back to the dark realms where in belongs to:
DECLARE @t TABLE (val INT)
INSERT INTO @t
SELECT 1 UNION ALL
SELECT 1 UNION ALL
SELECT NULL UNION ALL
SELECT NULL UNION ALL
SELECT 4 UNION ALL
SELECT 4 UNION ALL
SELECT 5
SELECT COUNT(*) AS CountAll, -- counts all rows
COUNT(val) AS CountAllNoNull, -- counts rows that don't contain NULL
COUNT(DISTINCT val)...