Going to try asking this a different way and see if anyone can help. I have two queries:
SELECT * FROM tblData WHERE Machine = 1 and Operator = 1
and
SELECT SUM(WorkSecs) as WorkTime, SUM(RunSecs) as RunTime
FROM tblData WHERE Machine = 1 and Operator = 1
Both of these queries are in a custom application I wrote that has been in operation for about four years. Both queries were taking only milliseconds to return a record. Some time last week the second query started taking about three seconds to return a record. The owner of the SQL server admits to mucking about with data table, so I have DROPPED the data table and CREATED it again. I have also backed up the database and truncated the transaction logs (though I don't think it would have any effect on this). The second query is still taking about three seconds to execute. The custom application is written in C++ using ADO and trusted connection. There are no ODBC/DSN connections defined on the client computer. Can anyone think of anything I can check on the SQL server or the client?
Thanx, >>>-----> MikeO
modified on Wednesday, May 26, 2010 10:16 AM