Chapter 11 - DB Performance Tuning and Query Optimization

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/53

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 6:39 PM on 4/18/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

54 Terms

1
New cards

Database Performance Tuning

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

2
New cards

Bottlenecks

A delay in the processing of an I/O operation that causes the overall system to slow down; caused by CPU, RAM, hard disk, network or application code

3
New cards

SQL Performance Tuning

(Client side) Activities to help generate a SQL query that returns the correct answer in the least amount of time, using the minimum amount of resources at the server end.

4
New cards

DBMS performance tuning

(Server side) Activities to ensure that the clients' requests are addressed as quickly as possible while making optimum use of existing resources

5
New cards

Data File

A named physical storage space where all data in a database is stored

6
New cards

Extents

The ability of data files to expand in size automatically using predefined increments

7
New cards

Table Space (file group)

A logical grouping space used to group related data

8
New cards

Data Cache (Buffer Cache)

A shared, reserved memory area that stores the most recently accessed data blocks in RAM; faster than working with data files

9
New cards

SQL Cache (Procedure Cache)

A shared, reserved memory area that stores the most recently executed SQL statements or PL/SQL procedures

10
New cards

Input/Output (I/O) Request

A low-level data access operation that reads or writes data to and from computer devices

11
New cards

Listener process

DBMS process that listens for clients' requests and handles the processing of the SQL requests to other DBMS processes

12
New cards

User process

DBMS process that manages each client session and handles requests submitted to the server

13
New cards

Scheduler process

DBMS process that organizes the concurrent execution of SQL requests

14
New cards

Lock Manager process

DBMS process that manages all locks placed on database objects including diskpages

15
New cards

Optimizer process

DBMS process that analyzes SQL queries and finds the most efficient way to access the data

16
New cards

What principles are query optimization algorithms based on?

  • Selection of optimum order to achieve fastest execution time

  • Selection of sites to be accessed to minimize communication costs

17
New cards

What are query optimization algorithms evaluated on?

Operation mode and timing of its optimization

18
New cards

Automatic Query Optimization

An operation mode where the DBMS finds the most efficient access path for the execution of a query

19
New cards

Manual Query Optimization

An operation mode that requires the end user or programmer to define the access path for the execution of the query

20
New cards

Static Query Optimization

A timing strategy where the access path to a database is predetermined at compilation time

21
New cards

Dynamic Query Optimization

A timing strategy where the most up-to-date information about the database is used to determine the SQL access strategy at run time

22
New cards

Statistically based Query Optimization

An algorithm that uses statistical information about a database to determine the best access strategy

23
New cards

Dynamic Statistical Generation Mode

A statistically based query optimization algorithm mode where the DBMS automatically evaluates and updates the statistics after each data access operation

24
New cards

Manual Statistical Generation Mode

A statistically based query optimization algorithm mode where the database administrator must run a periodic routine to generate the data access statistics

25
New cards

Rule-based Query Optimization

An algorithm that uses a set of user-defined rules to determine the best approach to executing a query

26
New cards

Database Statistics

A number of measurements about database objects such as number of processers used, processor speed and temporary space available

27
New cards

Phases of DBMS Query Processing

Parsing, Execution and Fetching

28
New cards

Parsing Phase

The DBMS breaks down the SQL query into smaller units and transform the original query into a fully equivalent and more efficient version

29
New cards

Query Optimizer

A DMBS process that analyzes SQL queries and generates the most efficient access/execution plan; performs the parsing activites

30
New cards

Rule-based optimizer

A query optimization mode based on the rule-basd query optimization algorithm

31
New cards

Cost-based Optimizer

A query optimization mode that uses an algorithm based on statistics about the objects being accessed

32
New cards

Optimizer Hints

Special instructions for the optimizer that are embedded inside the SQL command text

33
New cards

Access Plan

A set of instructions generated at application compilation time that the DBMS will use to execute the query and return the result set in the most efficient way

34
New cards

Table scan (full)

An access plan operation that reads the entire table sequentially, from first to last row, one at a time (slowest)

35
New cards

Table access (row ID)

An access plan operation that reads a table row directly, using the row ID value (fastest)

36
New cards

Index Scan (range)

An access plan operation that reads the index first to obtain the row Ids and then accesses the table rows directly (faster than full table scan)

37
New cards

Index Access (unique)

An access plan operation that reads and compares a set of values to another set of values, using a nested loop style (slow)

38
New cards

Merge

An access plan operation that merges two data sets (slow)

39
New cards

Sort

An access plan operation that sorts a data set (slow)

40
New cards

Execution Phase

The DBMS executes the SQL query using the chosen execution plan

41
New cards

Fetching Phase

The DBMS fetches the data and sends the result back to the client

42
New cards

Indexes

An ordered set of values that contain the index key and pointers; used when a subset of rows from a large table is to be selected based on a given condition

43
New cards

Advantages of Indexes

  • Helps speed up data access by facilitating searching, sorting, using aggregate functions and join operations

  • More efficient than full table scan

44
New cards

Data Sparsity

Number of different values a column could have

45
New cards

Hash Indexes

Based on an ordered list of hash values; good for simple and fast lookups based on equality conditions

46
New cards

B-Tree Index

Common and default index organized as an upside-down tree; good for tables where column values repeat a small number of times

47
New cards

Bitmap index

An index that uses bit arrays (0s and 1s) to represent the existence of a value or condition; good for tables with large amount of rows and small number of repeated column values

48
New cards

Index Selectivity

A measure of the likelihood that an index will be used in query processing

49
New cards

Function-based Index

A type of index based on a specific SQL function or expression.

50
New cards

Conditional expressions

Expressed within WHERE or HAVING clauses of a SQL statement

51
New cards

In-memory database

A database optimized to store large portions of a database in primary RAM storage rather than secondary (disk)

52
New cards

I/O Accelerator

A device used to improve throughput for I/O operations

53
New cards

Redundant Array of Independent Disks (RAID)

Uses multiple systems to create virtual disks from several individual disks

54
New cards

Index Organized Table

A type of table storage organization that stores end-user data and index data in consecutive locations in permanent storage (aka clustered index table)