wooody1245
Programmer
I have a fairly simple stored procedure. It does a select count(*) and based on the count it inserts a record into one of two tables. The problem is the procedure takes one and a half minutes to run causing my program to issue a time-out error. It used to only take 1 to 2 seconds. After the first run the stored procedure will run very quickly (1 to 2 seconds). It's just the initial run that I'm having an issue with.
I've done an execution plan and a server trace with query analyzer, but I can't see anything wrong with it. The two tables have 200 and 180,000 records in them. Even when the insert is to the small table it times out. Any suggestions on what else to look into would be greatly appreciated.
I've done an execution plan and a server trace with query analyzer, but I can't see anything wrong with it. The two tables have 200 and 180,000 records in them. Even when the insert is to the small table it times out. Any suggestions on what else to look into would be greatly appreciated.