O'Reilly logo

Microsoft® SQL Server™ 2005: Applied Techniques Step by Step by Solid Quality Learning

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summarizing Data in History Tables

By moving data to history tables, you can relieve your transactional system of the hit taken when reporting queries are run against it. History tables can be optimized for queries and maintained separately from the rest of the system. There are a number of ways to create these tables and keep them updated. We will walk through a few examples here that utilize both T-SQL and SQL Server Agent to load the tables.

In the following steps, you will create a summary table from the AdventureWorks database that will track the sales by a salesperson for given products. The goal is to be able to quickly discover how many units of a given product the salesperson has sold by querying on his or her name.

Creating and Loading ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required