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)
 To Find Performance

Author  Topic 

babu.knb
Starting Member

2 Posts

Posted - 2007-03-16 : 06:55:54
Hi,

Records are added to a table which can grow in millions with date of the creation. Views (also cascade of views) is used to calculate the grouped data:

for example:

1) here is a view to calculate aggregate data:

CREATE VIEW dbo.All_Campaign_Calls AS
SELECT TOP 100 PERCENT NUMCAMPAGNE AS Campaign_Num, OWNERNAME AS owner_name, STATUTPROSPECT AS STATUS, CAST(CONVERT(varchar(10), DATESELECT, 103) AS
datetime) AS call_date
FROM dbo.ProspectCampagne
WHERE (APPELE = '1')

this view shows from a prospect table for a given campagne, by date and by person used to call

2) here a view that uses the previous view to aggregate data: number of calls by date:
SELECT TOP 100 PERCENT Campaign_Num, call_date, SUM(nb_Total_Calls) AS nb_Total_Calls_day FROM dbo.Calls_Per_Campaign_Date_Status
GROUP BY Campaign_Num, call_date
ORDER BY Campaign_Num, call_date

3) here is a view that uses other views to agrregate data by data AND by person called:
SELECT TOP 100 PERCENT Campaign_Num, call_date, STATUS, SUM(Nb_Calls) AS nb_Total_Calls FROM dbo.Calls_Per_Campaign_Dt_Own_Stat
GROUP BY Campaign_Num, call_date, STATUS ORDER BY Campaign_Num, call_date, STATUS

etc.....

In SQL server DB; do the calculations:

We have views that gather, agregate data...

To know the performance of the server with 100k, 500k, 1M 2, 3, 4 million records ??

How to find that one ??


Regards

Babu B

pootle_flump

1064 Posts

Posted - 2007-03-16 : 07:17:20
@respondents FYI

http://www.dbforums.com/showthread.php?p=6262070#post6262070
Go to Top of Page
   

- Advertisement -