Adding a New Index
You will often find yourself in situations in which a SQL statement is running for an unreasonable amount of time, although the performance of other statements seems to be acceptable—for example, when conditions for data retrieval change or when table structures change.
This type of slowdown also occurs when a new screen or window has been added to a front-end application. One of the first things to do when you begin to troubleshoot is to find out whether the target table has an index. In most of the cases, the target table has an index, but one of the new conditions in the WHERE clause may lack an index. Look at the WHERE clause of the SQL statement and ask “Should I add another index?” The answer may be yes if
The most restrictive ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access