Page 1 of 1

Connection speed tips

Posted: Tue 15 Mar 2005 10:06
by R. Santana
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!

Posted: Wed 16 Mar 2005 08:38
by Paul
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.