|
Posted by Erland Sommarskog on 02/26/07 15:38
C10B (tswalton@gmail.com) writes:
> I'm still mildly puzzled as to how an indexed view would be quicker to
> function than going straight to the table. Surely there's exactly the
> same amount of work to be done?
No. An indexed view is materialised, and this particular view has one
row per webpage with the count of visitors. An alternative would be have
a separate table with the counts, and update that table through a trigger.
But why roll our own when SQL Server can do the job for us?
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|