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)
 Design Question Application or Database

Author  Topic 

Vishakha
Starting Member

40 Posts

Posted - 2006-12-04 : 06:15:09
I am working on a web application. It has lots of pages where it needs to fetch data from the database, show it in a tabular form and then it also has to show the sum on all the columns for different columns.

The query to get data is very complex.

From performance and ease of development angle what is a better way to handle this
1. Fetch the data in the application and do the sum.

2. Write a complicated query which will store the data in a derived table and show the columns along with the sums. and just output the table on the screen.

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-12-04 : 06:19:13
It's always better to keep totaling logic in the front-end and spare SQL Server for efficient data fetching.

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

Vishakha
Starting Member

40 Posts

Posted - 2006-12-04 : 06:31:39
Thanks Harsh,
Even I thought so, but just wanted to know which approach is faster.
Go to Top of Page
   

- Advertisement -