Current location - Loan Platform Complete Network - Big data management - How to design a large Oracle database
How to design a large Oracle database
Super-large system is characterized by: 1, the number of users are generally more than one million, some more than ten million, the database data volume is generally more than 1TB; 2, the system must provide a real-time response function, the system needs to be run without downtime, the system requires a high degree of availability and scalability.  In order to achieve the above requirements, in addition to the need for superior performance of computers and mass storage devices, but also requires advanced database structure design and optimization of the application system.  General mega-system using dual-computer or multi-computer cluster system. The following database using Oracle 8.0.6 parallel server as an example to talk about the ultra-large database design methodology: Determine the system's ORACLE parallel server application partitioning strategy Database physical structure design System hard disk partitioning and allocation Backup and recovery strategy considerations Second, Oracle parallel server application partitioning strategy Oracle parallel server allows different nodes on the Oracle Parallel Server allows multiple INSTANCE instances on different nodes to access a database at the same time to improve system availability, scalability, and performance. each INSTANCE instance in the Oracle Parallel Server can read blocks of data from tables or indexes in the ****-enjoyed database into local buffers, which means that a block of data can exist in the SGA area of multiple INSTANCE instances. It is important to maintain the consistency of the data in these buffers.Oracle uses PCM (Parallel Cache Management) locks to maintain buffer consistency.Oracle also implements PCM locks through I DLM (Integrated Distributed Lock Manager) and achieves data consistency between INSTANCE instances through the specialized LCK process. The PCM lock is implemented by I DLM (Integrated Distributed Lock Manager) and data consistency between INSTANCE instances is achieved by a specialized LCK process.  Consider this scenario: INSTANCE1 modifies the BLOCK X block, and then INSTANCE2 needs to modify the BLOCK X block as well. The Oracle Parallel Server utilizes the PCM locking mechanism to write the BLOCK X from the SGA area of INSTANCE 1 to the database data file, and reads the BLOCK X block from the data file into the SGA area of INSTANCE 2, and then reads the block into the SGA area of INSTANCE 2. INSTANCE2's SGA zone. This happens that is a PING. PING so that the original 1 MEMORY IO can complete the work into 2 DISK IO and 1 MEMORY IO to be able to complete, if there are too many systems PING, will greatly reduce the performance of the system.  Oracle parallel server in each PCM lock can manage multiple blocks of data. PCM locks manage the number of blocks of data with a data file assigned to the number of PCM locks and the size of the data file. When INSTANCE 1 and INSTANCE 2 want to operate different BLOCKS, if these BLOCKS are managed by the same PCM lock, a PING still occurs; these PINGs are called FALSE PINGs, and the PINGs that occur when more than one INSTANCE accesses the same BLOCK are TRUE PINGs. Reasonable application segmentation allows different applications to access different data. different applications to access different data, can avoid or reduce TRUE PING; by FALSE PING more data files to allocate more PCM locks can reduce the number of FALSE PING, increase the PCM locks can not reduce the TRUE PING. Therefore, Oracle parallel server design is to make the system transaction processing is reasonably distributed in the between INSTANCE instances to minimize PINGs, and to reasonably distribute PCM locks to reduce FALSE PINGs. the key to the design is to find out the possible conflicts that can be generated to determine the strategy for application partitioning. There are four methods of application partitioning as follows: 1) according to functional module partitioning, different nodes run different applications 2) according to user partitioning, different types of users run on different nodes 3) according to data partitioning, different nodes access different data or indexes 4) according to time partitioning, different applications run at different times Two important principles of application partitioning are to minimize the PING and to roughly balance the load on each node. The two important principles of application division are to minimize PING and to make the load of each node roughly balanced.  Third, the design of the physical structure of the database The physical structure of the database design includes determining the physical storage parameters of the tables and indexes, determining and allocating the database tablespace, determining the initial rollback section, temporary tablespace, redo log files, etc., and determining the main initialization parameters. The purpose of physical design is to improve the performance of the system. The parameters of the whole physical design can be adjusted according to the actual operation.  Estimation of Table and Index Data Volume and Setting of Physical Storage Parameters The storage capacity estimation of tables and indexes is determined based on their record length and the estimated maximum number of records. The capacity calculation takes into account the header overhead of data blocks and the header overhead of records and fields, and so on.