Basic Oracle peripheral performance optimization 1. modify the number of database connection processes the default number of connections in Oracle is 150, but often cannot meet our project requirements, especially in environments with extremely high concurrency. Therefore, we need to manually modify the number of processes linked to Oracle. View the number of processes currently linked to Oracle: www.2cto.com Java code <span style = "font-size: small;"> select count (*) from v $ process; </span> modify the number of Oracle linked processes: Java code <span style = "font-size: small;"> alter system set processes = number of processes scope = spfile; </span> Note: The number of connection processes is generally not recommended to be too large, because 32-bit Oracle cannot afford too many connections. Therefore, if you need to open too many connections, the minimum prerequisite is to prepare a 64-bit Oracle database. If the number of connections violates the upper limit allowed by Oracle, you cannot start the database instance. If you cannot start a database instance, you must modify the number of connections. You can find Oracle \ product \ 10.1.0 \ db_1 \ database \ SPFILE database instance name. ORA in the oracle installation directory, and modify or even start it successfully. Www.2cto.com 2. Modify the SGA (runtime memory) of Oracle. The SGA mainly consists of the Database Buffer Cache, Shared Pool, and Redo Log Cache) large Pool, Java Pool, streaming Pool, and other structures (such as fixed SGA and lock management. Oracle runtime memory can be adjusted based on the physical memory to better optimize Oracle performance. Assume that your physical memory is only 512 MB, which is usually a small application. It is recommended that the SGA of Oracle be set to approximately 240 M, where: The Shared Pool (SHARED_POOL_SIZE) can be set to 60 M to 80 M, depending on the actual number of users, queries, and so on. The data block buffer can be roughly allocated 120 M-150 M. In 8i, DB_BLOCK_BUFFERS needs to be set, and DB_BLOCK_BUFFER * DB_BLOCK_SIZE is equal to the data block buffer size. You can use db_cache_size to directly allocate the data buffer in 9i. Assuming that the physical memory is 1 GB, the SGA of Oracle can allocate 500 M: The Shared Pool allocates 150 M to 400 M, and the data buffer is allocated M to M. Assuming that the physical memory has 2 GB, SGA can allocate 1.2 GB, share the pool between 500 mb and MB, and the rest will be allocated to the data block buffer. Assume that there are more than 2 GB of physical resources: it is enough to share a pool of MB to MB, and it does not help much. (Biti_rainy has a special note) the data buffer is as large as possible, but you must pay attention to two problems: first, you need to leave enough memory for the operating system and other applications, and second, for a 32-bit operating system, Oracle's SGA has a limit of GB. Modify Oracle SGA: Java code <span style = "font-size: small;"> alter system set sga_max_size = memory value scope = spfile; alter system set sga_target = memory value scope = spfile; </span> prompt: If SGA exceeds the upper limit of Oracle, you cannot start the database instance. Therefore, the SGA resources of Oracle must be allocated based on physical resources. If your SGA instance has exceeded the upper limit and cannot be started, follow these steps: 1. sqlplus: sys/password @ database instance name as sysdba; 2. Call create pfile from spfile (the generated file name is the name of the init database instance. ora), modify the SGA value; 3. Call create spfile from pfile (the generated file name is: SPFILE database instance name. (ora); 4. Restart the Database Listener and database instance;