The number of seconds before an idle connection in the pool is discarded is stored in the following registry key:
\HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ |
You will notice that this key is absent for file-based database platforms, such as Access, dBase and Excel. If you are using Access through the Jet/OLEDB driver, you can add the following to the connection string to force connection pooling:
OLE DB Services=-1
Please test the performance of your app with and without this setting.
Microsoft states:
"To make the best use of connection pooling, explicitly close database connections as soon as possible. By default, a connection terminates after your script finishes execution. However, by explicitly closing a connection in your script after it is no longer needed, you reduce demand on the database server and make the connection available to other users."
No comments:
Post a Comment