Http://database.51cto.com/art/200#/12457.htmthe internal analysis principle of the Oracle database during the execution of Oracle SQL statements, that is, when a user submits an Oracle SQL expression for the first time, Oracle implements Hard parse for this SQL statement, this process is a bit like program compilation, checking related information such as syntax, table name, field name, and so on). This process takes a long time because it needs to analyze the syntax and semantics of the statement.
Then obtain the optimized execution plan SQL plan), and allocate a certain amount of space in the memory to save the statement and the corresponding execution plan.
When a user requests a second request or multiple requests, Oracle automatically finds the previous statement and execution plan without performing Hard parse, instead, execute Soft parse to call up the execution plan corresponding to the statement and then execute it) to reduce the database analysis time.
Note: Only statements with the same case, space, and line feed in Oracle can reuse the previous analysis results and execution plans.
The analysis process is as follows:
For a large number of Oracle SQL statements that are frequently accessed, if you do not use the Bind Variable method, which Oracle will spend a lot of Shared latch and CPU for Hard parse processing, we should try to improve the statement reuse rate and reduce the statement analysis time. By understanding the analysis process of OracleSQL statements, we can understand the internal processing logic of Oracle and avoid it in design and implementation.
When using JDBC or other persistent data (such as Hibernate and JDO) operations, should we try to use placeholders ?)