Oracle 什么时候才不会对SQL做解析直接执行?
AWR里有个execute to parse的指标,数字越大说明直接执行不经过解析的sql比例越大。
但是参考oracle文档叙述如下:
SQL Parsing
The first stage of SQL processing is parsing.
The parsing stage involves separating the pieces of a SQL statement into a data structure that other routines can process. The database parses a statement when instructed by the application, which means that only the application, and not the database itself, can reduce the number of parses.
When an application issues a SQL statement, the application makes a parse call to the database to prepare the statement for execution.
2个要点:
1、数据库听从程序要不要解析的指令,只有程序自己才能减少解析
2、每当程序发出一条SQL,程序会发出一个parse call
这两点看起来就有点矛盾,每当程序发出一套sql都会发出parse call的话,那不就是已经是进入解析流程?
那程序又怎么才能让数据库不做解析呢?