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)
 Performance Questions SPs, Views, Web based report

Author  Topic 

jrockfl
Posting Yak Master

223 Posts

Posted - 2006-03-24 : 08:31:52
have been creating some web based reports and was a little concerned about performance and the time required to execute some queries and generate some flash graphs.

I have created a view that joins 3 tables and also does some DateDiffs and Case statements
For example the difference in days between these dates and then a classication such as "on time".
Here is a generic example
SELECT col1, col2, col3, DateDiff(day, col2, col3) AS Col4, CASE WHEN DateDiff(day, col2, col3) > 30 THEN 'LATE'...etc

Then I created a couple stored procedures that are called by the web page to execute the query based on ID or some other factors.

Am I going about this the "right" way or am I doing this totally wrong?
The other options I had thought of was...
1.) Have the cfm/asp.net page process all of the conditional statements instead of the view.
2.) Have a DTS job run at night to massage all of the data and perform that majority of the calculations
3.) Do nothing until someone complains and consider it an upgrade :)
   

- Advertisement -