Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Summary tables vs Temp tables vs Views

Author  Topic 

inrsence
Starting Member

48 Posts

Posted - 2001-09-26 : 10:06:16
Hi all,

I'm just looking for feedback here on some different concepts.. this is not mean to be a views ashould never be used, etc. kinda holy war.. just some feedback.

I'm developing a reporting system that has to do a lot of different types of aggregrates.. some of them are only computed after determing other aggregrated values.

I've got the solution working now within a SP using temp tables, but I'm left wondering if because of the frequency that these reports will be viewed whether or not I should perhaps create what I'm calling for lack of a better term a "Summary table" that stores this intermediate data.

I see the following alternatives available to me:

1. Temp table
This is the approach I am using now. Performance is fine for the time being.

2. Summary table / view
This approach seems to allow me to use the database to "cache" the recordset. I'm not sure how much cacheing SQL Server is doing for me already which is part of my problem.

3. Application cache
I could make use of WDDX to actually cache the dataset to XML and then re-create the dataset from there. This is not a bad approach either.. depending on size of the data.. which is generally small.

Some answers to questions that I am sure you'll ask:
- Currently running on SQL 7

- Estimated concurrent users < 25

- The data has to be first passed through a dynamic cross-tab to make it usable

- The data does not need to be updated every time it is viewed.. so triggers or scheduled jobs can perform those updates


I welcome any feedback on the matter.

Greg
   

- Advertisement -