Query Processing Bottlenecks

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/29

flashcard set

Earn XP

Description and Tags

A comprehensive set of Q&A flashcards covering definitions, causes, and solutions for memory, I/O, processing, and indexing bottlenecks in database systems.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards

What is a database "bottleneck"?

A degradation in performance that occurs when demand for services or resources exceeds what is available, causing slow queries, longer response times, and reduced scalability.

2
New cards

Which four major categories of bottlenecks were discussed in the lesson?

Memory bottlenecks, Input/Output (I/O) bottlenecks, Processing bottlenecks, and Indexing bottlenecks.

3
New cards

What typical symptoms suggest a MEMORY bottleneck?

Long query execution times, excessive disk paging/​I-O, and out-of-memory messages in the logs.

4
New cards

How can adding more physical RAM help resolve a memory bottleneck?

It gives the database enough working memory, reducing the need for disk paging and eliminating competition among processes for limited RAM.

5
New cards

What role does a QUERY OPTIMIZER play in mitigating memory or processing issues?

It analyzes each SQL statement and chooses the most efficient execution plan, reducing memory usage and CPU time.

6
New cards

Define a "memory leak."

A condition in which a program allocates memory but fails to release it when no longer needed, eventually exhausting available memory.

7
New cards

What is an I/O bottleneck?

A performance problem that arises when bandwidth limits reading from or writing to storage devices.

8
New cards

In I/O terminology, what is "latency"?

The delay between issuing a request for data and the moment the request is fulfilled.

9
New cards

Why might switching from HDDs to SSDs mitigate an I/O bottleneck?

SSDs provide much faster and lower-latency reads/writes than traditional spinning disks.

10
New cards

Explain how RAID can improve disk throughput.

RAID (Redundant Array of Independent Disks) spreads data across multiple disks so reads and writes are split, speeding overall I/O performance.

11
New cards

What is file "fragmentation," and how does a defragmenter help?

Fragmentation is when a file’s pieces are stored in non-contiguous disk sectors; a defragmenter rearranges them contiguously, shortening head-movement times on HDDs.

12
New cards

Why is defragmentation unnecessary on solid-state drives (SSDs)?

SSDs have no mechanical read/write head, so access time is consistent regardless of file contiguity.

13
New cards

How does QUERY PAGINATION ease I/O load?

It retrieves large result sets in smaller pages rather than fetching everything at once, lowering immediate disk and network traffic.

14
New cards

What does an "isolation level" control in a database?

The degree to which one transaction must be isolated from the effects of other concurrent transactions.

15
New cards

Define "database locking."

A concurrency-control mechanism that prevents multiple users from modifying the same data simultaneously.

16
New cards

What is "disk caching" in database systems?

Keeping frequently accessed data in memory so physical disk reads are minimized, greatly speeding access.

17
New cards

Describe an "in-memory database."

A DBMS that stores and retrieves most or all data directly from RAM rather than disk storage.

18
New cards

What causes a PROCESSING bottleneck?

The CPU cannot keep up with workload demands, often due to inefficient queries, lack of indexes, or inadequate hardware.

19
New cards

Give two query-side ways to relieve a processing bottleneck.

1) Rewrite/optimize queries for more efficient joins and logic; 2) Add indexes to frequently searched columns to avoid full table scans.

20
New cards

How can poor database design increase CPU processing load?

Suboptimal schemas lead to costly joins, full table scans, and redundant data access, all of which consume extra CPU cycles.

21
New cards

What is "sharding," and how can it help processing throughput?

Splitting a large database into independent pieces (shards) distributed across servers, parallelizing workload and reducing per-node CPU load.

22
New cards

Explain "connection pooling."

A technique that reuses existing database connections instead of opening/closing them for every request, saving CPU and memory resources.

23
New cards

List three routine maintenance tasks that reduce processing bottlenecks.

Rebuilding indexes, updating statistics, and cleaning up/archiving old data.

24
New cards

What is an INDEXING bottleneck?

Performance problems that occur because maintaining or updating indexes slows operations or because missing/poor indexes hurt query speed.

25
New cards

How can having too many indexes slow data modifications?

INSERT, UPDATE, and DELETE operations must update every index, so excess indexes add significant overhead.

26
New cards

Why do missing indexes on frequently filtered columns cause slow queries?

The DBMS must perform full table scans, increasing disk I/O and CPU work.

27
New cards

How does index fragmentation degrade performance?

Scattered index pages require more reads; reorganizing or rebuilding the index restores contiguous structure and speed.

28
New cards

What is "index cardinality" and why does it matter?

The ratio of unique values in an index versus total rows; very low or very high cardinality can cause the optimizer to ignore the index or make inefficient plans.

29
New cards

Describe a well-designed composite index.

Places the most selective column(s) first so the index aligns with typical WHERE/​JOIN predicates.

30
New cards

Give four general techniques to alleviate database bottlenecks.

Indexing, caching, partitioning/sharding, load balancing, as well as hardware upgrades and query optimization.