I have a query that takes 5 minutes to run.
I already posted a question about ideas on improving the speed here:
But, my new problem is that it appears that whenever a user runs this query, it is preventing other users from inserting new rows into one of the tables the slow query references.
I have a screen shot of the Locks being held by the user running the SELECT query here:
That user is currently blocking another user who was trying to do an INSERT statement against tbl_advertisement
Why would a SELECT prevent an INSERT from occuring?
The user doing the INSERT is using an MS Access front-end, connecting to the SQL server via ODBC linked tables. The error they get is "ODBC call failed: Timeout has expired."
They can retry the INSERT statement and it will continue to fail while the other user is running the SELECT query. As soon as the SELECT completes, if you retry the INSERT it is instantly successful.
I already posted a question about ideas on improving the speed here:
But, my new problem is that it appears that whenever a user runs this query, it is preventing other users from inserting new rows into one of the tables the slow query references.
I have a screen shot of the Locks being held by the user running the SELECT query here:
That user is currently blocking another user who was trying to do an INSERT statement against tbl_advertisement
Why would a SELECT prevent an INSERT from occuring?
The user doing the INSERT is using an MS Access front-end, connecting to the SQL server via ODBC linked tables. The error they get is "ODBC call failed: Timeout has expired."
They can retry the INSERT statement and it will continue to fail while the other user is running the SELECT query. As soon as the SELECT completes, if you retry the INSERT it is instantly successful.