Question: Pro * C connection pool (Oracle9i Version)

Source: Internet
Author: User
Recently, I tried the connection pool function of Pro * C in Oracle9i, and the more I get confused:
1. First, add the following options to the compilation parameters of Proc:
Threads = Yes Multithreading
Cpool = yes use the connection pool
Cmax = 6 up to 6 Connections
Cmin = 4 at least 4 connections
Cincr = 1 Add a connection each time
Ctimeout = 2: The time for deleting an inactive connection. Delete the inactive connection within 2 seconds.
Cnowait = 1 Number of reconnections when the connection fails

2. Write a simple connection to the Oracle database in the program. Press the Enter key to close the Connection Program.

The following features are found:
1. After using the connection pool option, query the V $ session view in the Oracle database before connecting to the database, and find that no connection exists in the test program;
2. After connecting to the database for the first time, query the V $ session view and find that the test program has a Cmin + 1 connection (5 connections)
3. If you continue to connect to the database, the number of connections will increase continuously. The number of connections can exceed the Cmax value, and the total number of connections = Cmin + number of connections;
4. Close the database connection. After closing all the connections, check that there are still Cmin connections in the V $ session;
5. After the entire program exits, all connections will disappear from the V $ session.

I am very confused about proc's connection pool function. In information, the connection pool function provides many logical connections, but only a few physical connections are provided internally, improve performance by reducing the number of physical connections and increasing the speed of logical connections. However, from the experiment, the number of physical connections in the Oracle database has not changed. Maybe I should perform a performance test to check whether the program performance has improved after the connection pool option is enabled. Maybe I have used Oracle9i, maybe 10 Gb will fully support this function ............

Please be clear about how to use the Pro * C connection pool. Thank you!
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.