UNIT 5 Expensive SQL Statements Flashcards

1
Q

What can make an SQL statement expensive?

A

Statement that causes the database to read many blocks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

We can see estimated ______ and estimated _______ in the explain plan for an SQL statement.

A

Cost and rows

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the transactions that you can use to show the Explain Plan for an SQL?

A

ST04

ST05

ST12

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the general solution for a full table scan?

A

Create index with selective field

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

If you saw many work processes performing

sequential read or direct read for too long, what could you check?

A

Analyze the database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How are optimizer statistics kept up to date?

A

Schedule periodic refreshes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What info is taken into account when executing an SQL statement for an optimal access strategy?

A

1) Where cause fields*
2) Availability of index’s *
3) Statistics of the table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly