Oracle Performance Tuning Flashcards

1
Q

What do you mean by row chaining?

A

Row chaining occurs when a row is too large to fit into one data block. This will cause Oracle to store the data for the row in a chain or blocks reserved for that segment.

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

Explain the advantages of using a view.

A

The view helps provide security, presents data in a different perspective, and stores complex queues.

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

Who is responsible for updating the indexes?

A

Oracle will automatically maintain and use indexes. When any change is made in the table, Oracle will automatically distribute it into the relevant indexes.

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

Why is an index used?

A

Used to increase performance of retrieval and slows down the performance of insertion.

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

How do you prevent users form connecting to a database during a maintenance period?

A

Open the DB in restricted mode. In this mode, only users with the restricted session privilege can connect to the database. By default, only DBAs have this privilege.

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

A user is complaining the DB is slow. How would you find the performance issue?

A
  • Join your query v$session with v$wait to check the events that are waiting for something and try to find out the object locks.
  • Run SQL Tuning Advisor
  • Run TOP command in Linux to check CPU usage.
  • Run VMSTAT, SAR, PRSTAT to get more info on CPU, memory usage, and possible blocking.
  • Check trace file using tkprof.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the difference between DB file sequential read and DB file scattered read?

A
  • File sequential read operation reads data into contiguous memory. It’s also used for rebuilding the control file and reading datafile headers.
  • File scattered read will read multiple data blocks and scatter them into different discontinuous buffers in the SGA.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is row migration?

A

Row migration occurs when there is insufficient free space in the block for an updated row. That row is moved to a different block and Oracle will leave a pointer (rowid) in the original block. This can result in fragmentation of the block/table/database.

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