Reply to Re: My design - where did I go wrong?

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация