Connection speed tips

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
R. Santana
Posts: 36
Joined: Tue 18 Jan 2005 20:52
Location: SPAIN

Connection speed tips

Post by R. Santana » Tue 15 Mar 2005 10:06


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?


Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Wed 16 Mar 2005 08:38

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.

Post Reply