Oracle Pro*C/C++ can I reuse oracle connections between multiple processes
0
votes
0
answers
39
views
I have old toolkit of Oracle Pro*C applications, where each tool connects to same OracleDB (via TNS alias) and performs some fairly quick SQL query and exits.
In daily use these apps are organized by external orchestrator in a bulky file processing workflow, and each app is executed thousands times per hour.. Obviously, due to latency creating connection each time, it all working slow, while CPU/IO load is fairly low about 20-40 requests/runs per min. I cannot refactor the workflow much, neither the application's code.
Can I setup so-called **connection pool** on the Oracle Client 12c client/driver? so each time a new process opens new oracle session, it will not communicate the server, but rather reuse some existing local session?
The Pro*C preprocessor seems support CPOOL=YES option, but the documentation says about it only:
> *Based on this option, the precompiler generates the appropriate code
> that directs SQLLIB to enable or disable the connection pool feature*.
If I recompile all my "mini-programs" with this option (end enable connection pool on the server side of course), will the separate linux processes use this pool, or this feature is only for heavy applications with multithreaded architecture?
I hope that if it is possible, then avoiding lots of sessions reinitialisations will improve overall performance of my system without major refactoring.
Asked by Fedor
(1 rep)
Oct 16, 2024, 05:07 PM