There are 3 aspects: 1. Quick Response Time 2. Use the CPU resource, 3 minimum I / O operation
Promote some tips for optimal SQL
* In the I / O point of view, you will encourage full-mete scan when using indexes.
If the index scanned block is more effective than the full table scan, it is very effective.
* If SQL contains a child query, you should optimize them. In fact, you should first optimize them. If the child is not performing well, the primary query cannot be performed well. If a connection will provide the function of the subquery, then Before trying to use the subquery method, you should first try the connection method. Please pay attention to the associated subqueries because their cost is very high and the CPU is frequent.
* Use not exists in the WHERE condition of the SQL statement instead of Not in
* Use the Like operator with the leading characters instead of the Substr function. There is a leader character (such as the 'a%' in the comparative value), the index will be used using the LIKE operator.
The SUBSTR function will invalidate the index, unless the version of the database is Oracle8i and has established a function-based index.
- Not finished -