Home > Article > Operation and Maintenance > Comparative analysis of performance of Oracle11g and Oracle12c
Oracle database has always been one of the most widely used relational database management systems in enterprises. Among the many versions, Oracle11g and Oracle12c are two versions that have attracted much attention. This article will conduct a comparative analysis of the performance of Oracle11g and Oracle12c, and demonstrate their differences, advantages and disadvantages through specific code examples.
1. Comparison of database architecture
There are some differences in the database architecture between Oracle11g and Oracle12c. Oracle12c introduces the concept of Container Database (CDB), which can accommodate multiple Pluggable Database (PDB). This architecture can achieve higher flexibility and resource sharing. In contrast, Oracle11g adopts the traditional single database model.
Sample code-create CDB and PDB:
-- Oracle12c CREATE DATABASE CDB1 USER SYS IDENTIFIED BY password USER SYSTEM IDENTIFIED BY password ENABLE PLUGGABLE DATABASE; -- Create PDB CREATE PLUGGABLE DATABASE PDB1 ADMIN USER pdb_admin IDENTIFIED BY password FILE_NAME_CONVERT=('/pdbseed/', '/pdb1/'); -- Oracle11g CREATE DATABASE single_db
2. Performance optimization comparison
In terms of performance optimization, Oracle12c has introduced some new features and improvements, such as In- Memory Column Store and Automatic Data Optimization, etc., can improve query efficiency and storage management. In contrast, Oracle11g is relatively traditional.
Sample code - enable In-Memory Column Store:
-- Oracle12c ALTER SYSTEM SET inmemory_size=1G SCOPE=SPFILE; ALTER SYSTEM SET inmemory_size=1G; -- Oracle11g -- Not supported
3. Query optimization comparison
Oracle12c has certain advantages over Oracle11g in query optimization, such as the introduction of New optimizer features are introduced to better handle complex query statements.
Sample code - query optimization:
-- Oracle12c SELECT /*+ OPTIMIZER_FEATURES_ENABLE('12.2.0.1') */ * FROM table_name; -- Oracle11g SELECT * FROM table_name;
4. Security comparison
Oracle12c has some new features in terms of security, such as Transparent Data Encryption and Unified Auditing. These features Can protect the data security in the database.
Sample code - enable Transparent Data Encryption:
-- Oracle12c ALTER SYSTEM SET ENCRYPTION KEY IDENTIFIED BY 'password'; ALTER DATABASE ENCRYPT; -- Oracle11g -- Not supported
To sum up, Oracle12c has certain advantages over Oracle11g in terms of database architecture, performance optimization, query optimization and security, but You also need to consider factors such as actual business needs and migration costs. Choosing the version that suits you is the most important thing. I hope the comparative analysis in this article will be helpful to everyone.
The above is the detailed content of Comparative analysis of performance of Oracle11g and Oracle12c. For more information, please follow other related articles on the PHP Chinese website!