You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the connection pool for a link to wait a long time when, but into a single link to connection speed is quite fast
my test platform
window 10, qt 4.6.2 ,
test code:
int main()
{
char strTNS[] = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))";
Environment::Initialize(Environment::Default | Environment::Threaded);
Environment::EnableWarnings(true);
Pool connPool;
Connection conn;
cout << "Oracle Connection Start Time: "<< time(NULL)<< std::endl;
conn.Open(strTNS,"test","test");
cout << "Oracle Connection Start Time: "<< time(NULL)<< std::endl;
conn.Close();
connPool.OpenOpen(strTNS,"test","test",Pool::ConnectionPool,1,5);
cout << "Oracle Pool Get Connection Start Time: "<< time(NULL)<< std::endl;
Connection poolConn = connPool.GetConnection();
cout << "Oracle Pool Get Connection End Time: "<< time(NULL)<< std::endl;
poolConn.Close;
Environment::Cleanup();
return 0;
}
output result:
Oracle Connection Start Time: 1465606583
Oracle Connection End Time:1465606583
Oracle Pool Get Connection Start Time: 1465606583
Oracle Pool Get Connection End Time: 1465606592
The text was updated successfully, but these errors were encountered:
If it takes more times from the pool, it must be an Oracle client related topic.
There is no reason why OCILIB shall take more time. Same internal code.
Do subsequent connection retrieval take same time or is it only the first time ?
If it is only the first connection retrieval that is longer it may be normal as Oracle Client has more work to do for creating and allocating pool resources as the job is done the first time a connection is retrieved.
Only connections retrieved from pools on Oracle Client 11g and above may present this issue.
Same code with 10g and bellow is working ok but slower with 11g/12C for connection pools (at least on Windows, using default tnsnames.ora)
Sessions pools do not present the issue whatever the Oracle version.
May be something to report to Oracle support...
From the connection pool for a link to wait a long time when, but into a single link to connection speed is quite fast
my test platform
window 10, qt 4.6.2 ,
test code:
int main()
{
char strTNS[] = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))";
Environment::Initialize(Environment::Default | Environment::Threaded);
Environment::EnableWarnings(true);
Pool connPool;
Connection conn;
cout << "Oracle Connection Start Time: "<< time(NULL)<< std::endl;
conn.Open(strTNS,"test","test");
cout << "Oracle Connection Start Time: "<< time(NULL)<< std::endl;
conn.Close();
connPool.OpenOpen(strTNS,"test","test",Pool::ConnectionPool,1,5);
cout << "Oracle Pool Get Connection Start Time: "<< time(NULL)<< std::endl;
Connection poolConn = connPool.GetConnection();
cout << "Oracle Pool Get Connection End Time: "<< time(NULL)<< std::endl;
poolConn.Close;
}
output result:
Oracle Connection Start Time: 1465606583
Oracle Connection End Time:1465606583
Oracle Pool Get Connection Start Time: 1465606583
Oracle Pool Get Connection End Time: 1465606592
The text was updated successfully, but these errors were encountered: