Oracle SQL Performance Optimization (Learning Notes)

xiaoxiao2021-03-06  116

Recording a small table should be in the last multi-table query of from

Which one of from Wrom should write when writing conditions?

Write the connection between tables when WHERE conditions

SELECT word to avoid use of '*'

Try to minimize the number of access to the database

Replace Delete with truncate when deleting full table (unrecoverable)

Use Commit as much as possible

Use the alias (Alias)

Use exists to replace in (not all cases)

Use table connection to replace EXISTS

Avoid using calculations on index columns

Avoid using NOT on the index column

Use> = alternative>

Replace OR with UNION (for index columns)

Avoid using is NULL and IS NOT NULL on index columns

Avoid changing the type of index

Substitution with WHER ORDER BY

The ORDER BY clause uses an index only under two strict conditions.

All columns in ORDER BY must be included in the same index and remain in the index in the index.

There is at least one listed in Order By '

In the WHERE clause! = || operator will not use the index column name = nVL (column name) Do not use index like> Using an index

转载请注明原文地址:https://www.9cbs.com/read-103215.html

New Post(0)