Database tuning Flashcards

1
Q

What is Database tuning ?

A

A set of activities and procedures designed to reduce the response time of the database system.

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

Factors determines the performance

A

CPU processing power
Available primary memory (RAM)
Input / Output

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

Data files and Data space

A

Data files - all data in a database are stored in data files, while data space is a logical grouping of data files with similar characteristics

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

Data cache or buffer cache and SQL cache or procedure cache

A

Data cache - reserved memory area for the most recently accessed data blocks in RAM
SQL cache - shared,reserved memory for the recently executed SQL statement or procedure or functions

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

IO request

A

low - level read or write data access operation from and to computer devices

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

Database statistics

A

number of measurements of database objects like no. of processors used, processor speed and temp space available.

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

Different factors of database statistics

A
  1. Table - no. of tables, mo. of disk blocks uesd, row length, no. of columns in each row, max and min of each column
  2. Indexes - no and name of columns in index key and etc
  3. Environmental Resources - logical and physical disk block size, location of data blocks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

3 steps of query processing

A

Parsing, Execution and Fetching

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

Parsing of query processing

A
  • Breaking down and transform the original query into fully equivalent and more efficient
  • performed by the query optimizer, which analyze the SQL query and find the most efficient way to ACCESS THE DATA
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Step involved in parsing

A
  1. Syntax check
  2. Naming check
  3. Access right check
  4. Decompose and analyze
  5. Generate access plan
  6. Store access plan in the SQL cache
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

QUery processing bottlenecks and factors that cause it

A

A delay introduced in the processing of an IO operation that cause delay in the overall system to slow down.
5 factors that causes it
1. CPU 2. RAM 3. Hard disk 4. Network and 5. Application code

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

3 data structures to implement data index

A
  1. Hash index - based on an ordered list of hash values
  2. B-tree index - ordered data structure organized as an upside - down tree (commonly used)
  3. Bitmap index - uses a bit array to represent the existence of a value or condition (used in data warehousing)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Two modes of query optimizer

A
  1. Rule - based: uses preset rules and points to determine the best approach
  2. Cost - based: use sophisticated approach based on statistics about the object being accessed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Optimizer hints and its types

A

Special instructions for the optimizer embedded in the sql statements
ALL_ROWS, FIRST_ROWS and index(name)

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