|
Posted by Erland Sommarskog on 07/30/05 19:35
--CELKO-- (jcelko212@earthlink.net) writes:
>>> I've also just started reading about Real-Time OLAP cubes and Analysis
Services. Would this help me in any way? <<
>
> This is probably the best answer, but in the meantime you can do a VIEW
> with all the summaries: Basically convert all of your WHERE clauses
> into CASE expressions
>
> SELECT MAX (CASE WHEN sale_date > '2005-01-01' THEN s1 END),
> AVG (CASE WHEN S3 > S4 THEN (s1 / s2) END),
> etc.
> FROM Sales1 ;
That would have to be an indexed view to give the performance Rich is
required to produce. Since there are a lot of restrictions with indexed
views on what you can put into them, this may require quite some tweaks.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
[Back to original message]
|