Craig Freedman's SQL Server Blog

A discussion of query processing, query execution, and query plans in SQL Server.
Posts
  • Craig Freedman's SQL Server Blog

    Maintaining Unique Indexes

    • 7 Comments
    Consider the following schema: CREATE TABLE T (PK INT PRIMARY KEY, A INT, B INT) CREATE INDEX TA ON T(A) CREATE UNIQUE INDEX TB ON T(B) INSERT T VALUES (0, 0, 0) INSERT T VALUES (1, 1, 1) Now suppose we run the following update statement: ...
  • Craig Freedman's SQL Server Blog

    Aggregation WITH ROLLUP

    • 6 Comments
    In this post, I'm going to discuss how aggregation WITH ROLLUP works. The WITH ROLLUP clause permits us to execute multiple "levels" of aggregation in a single statement. For example, suppose we have the following fictitious sales data. (This is the same...
  • Craig Freedman's SQL Server Blog

    Aggregation WITH CUBE

    • 6 Comments
    In my last post, I wrote about how aggregation WITH ROLLUP works. In this post, I will discuss how aggregation WITH CUBE works. Like the WITH ROLLUP clause, the WITH CUBE clause permits us to compute multiple "levels" of aggregation in a single statement...
Page 1 of 1 (3 items)