I have a table with 2.6 million records against which I am performing
the following query and it is taking 13.28 minutes
Is it normal or is this really long time. The Server is dual pentium
with 1 GB RAM
SELECT UserName, app, sum(datediff(minute, Start_time, end_time)) as
Usage
FROM trackapp
WHERE start_time > '5/1/2000' and end_time < '5/30/2000'
AND app_path not like 'c:\%'
GROUP BY UserName, app
ORDER BY UserName.
I have following indexes defined:
1) trackapp ;Clustered ; Located on Primary; Process_ID, Start_time,
WServer
2) TRACKAPP3 ; NON CLUSTERED; Located on Primary; Wserver
3) TRACKAPP4 ; NON CLUSTERED; Located on Primary; App
4) TRACKAPP5 ; NON CLUSTERED; Located on Primary; App_Path
5) TRACKAPP6 ; NON CLUSTERED; Located on Primary; WDomain, UserName
6) TRACKAPP7 ; NON CLUSTERED; Located on Primary; Star_Time, End_time,
App_Path
Examination of the Query Plan shows that it is doing a Clustered Index
Scan.
I have also run the Update Statistics on all indexes but no change in
execution time.
Any help or guidance would be greatly appreciated.
Thanks
Jay
Sent via Deja.com http://www.deja.com/
Before you buy.