|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by Mach1pro in Microsoft Access Database
I have an Access 2007 front end connected to an sql server back end with odbc tables. I have a simple SP in sql server that only takes one parameter to delete the records from a table. Run from SQL enterprise manager, this delete sp runs in under a second. In the Access code, I am using ado to connect to sql server and then run the SP as an adodb command. When I first open Access and run the command, it will take anywhere from 10-20 seconds to execute. I can change the parameter, run it again (or use the same parameter) and it will execute in a 1-2 seconds. If I close Access, reopen it and run it again, it will still run in 1-2 seconds. If I restart the machine, open Access and rerun it, then the first time run is back to 10-20 seconds.
What is going on here and how can I speed up the initial execution of this query?
I've already tried running an Access delete query directly against the odbc table and its slower than using the adodb command.
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625