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)
 Large ADD() operations

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-04-10 : 11:42:30
Alain writes "Background:
As you would know MS Proxy can write its log to an SQL table. I have written an asp script analysing the output of MSProxy. More specifically adding up the bytes received field. The main queries involved in this script adds up the results of one field using the ADD() function.

eg.
select SUM(bytesrecvd) brcvd from dbo_MSP_LOG_TABLE where ClientAuthenticate = 'Y'

The problem is that the database, after 1 week, has 1.2 million records and subsequently the query takes 5 minutes to run. Run 10 queries in a page and that = 50 minutes which in turn = timeout.

How do I speed up large ADD() operations? Views? Stored Procedure?
Miracle?"
   

- Advertisement -