UNIT 5 Expensive SQL Statements Flashcards
What can make an SQL statement expensive?
Statement that causes the database to read many blocks
We can see estimated ______ and estimated _______ in the explain plan for an SQL statement.
Cost and rows
What are the transactions that you can use to show the Explain Plan for an SQL?
ST04
ST05
ST12
What is the general solution for a full table scan?
Create index with selective field
If you saw many work processes performing
sequential read or direct read for too long, what could you check?
Analyze the database
How are optimizer statistics kept up to date?
Schedule periodic refreshes
What info is taken into account when executing an SQL statement for an optimal access strategy?
1) Where cause fields*
2) Availability of index’s *
3) Statistics of the table