Close or not close Oracle connection?

My application has performance problems, so I started researching this from the root: "Connecting to the database."

Best practices say, “Open the connection, use it and close it as soon as possible,” but I don’t know the overhead that occurs, so the question is:

1 - "Open, use, close connections as soon as possible, is it best to use ODP.NET?"

2 - Is there a way and how to use the connection pool with ODP.NET? I am thinking of creating a list to store connection strings and creating logic to select the “best” connection every time I need it. Is this the best way to do this?

+5
source share
3

-, Oracle:

http://www.oracle.com/technetwork/topics/dotnet/ow2011-bp-performance-deploy-dotnet-518050.pdf

OracleConnection. . , .

. ODP.NET. .

, OracleConnections, , , , . , ODP.NET , . , Close() AND Dispose() Oracle ODP.NET( OracleConnection), .

Oracle ( -)

(EDIT: ODP.NET, .)

Oracle

+6

ODP.NET ADO.NET. ADO.Net Open, Get Data ( ), , . , OracleDataReader DataTable .

[] 's

+1

, , , . , . , , ? (. . ). ConnectionState.Broken .

0

All Articles