Hello,
as everybody know, oracle is slow when you open a connection to it, well, I have a web application that uses oracle data on every page, anybody have a tip or sample code to avoid the client to be waiting for the connection to be opened?
I've tried at global.asax to open a connection when the application starts and assign it to a session object for each new user, closing it when session ends, it works, but I think that is not the best way.
Can anybody help me with this?
Thanks!
Connection speed tips
You can use connection pooling in OraDirect .NET. Please look at "Pooling=true" parameter in OracleConnection.connectionString.
But if activity on your site is very low (rarely that one connection per 4 minutes), then connection pool can close all connectors and new connection will take a long time. To avoid this you can create timer and each 3 minutes Open and Close separate OracleConnection component with assigned your connectionString.
But if activity on your site is very low (rarely that one connection per 4 minutes), then connection pool can close all connectors and new connection will take a long time. To avoid this you can create timer and each 3 minutes Open and Close separate OracleConnection component with assigned your connectionString.