We have a database that stores values for different characteristics taken at different times. The data is stored in the following format:
The result set for a two hour time span returns >41,000 rows, the result set for a one week time span returns >2.9 million rows. We have multiple data sources, each with its own set of characteristics, each source takes readings at different times and then stores those readings in the above schema. The problem we are running into is, our end users want the data in the following format:
Needless to say, when we pivot on a two hour block, it does take all that long (just over a minute), but when we try to pivot over a one week block, it takes considerably longer, much longer than anyone likes.
Is there a better way of doing this? Would storing the data in the same schema as we want to report in be wiser?
System Information: 2x XEON (Hyperthreaded to 4) 3Ghz
3GB ram
SQL Server 2005
Reporting Services 2005
Thanks for any help.
Wayne E. Pfeffer
The only fast solution I can think of is to use an ssas cube to pivot this
Philippe
No comments:
Post a Comment