Evaluation of Relational Operators

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

1/25

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

26 Terms

1
New cards

Relational Operator

Evaluated using algorithms that read/write pages to/from disk

2
New cards

Selection (σ) Methods

Table scan, index scan, or using binary search on sorted file

3
New cards

Selection with Index

Index access is faster for selective conditions

4
New cards

Projection (π) Methods

Eliminate unwanted attributes; may use sorting or hashing to remove duplicates

5
New cards

Duplicate Elimination (π)

Use sorting or hashing to identify and remove duplicates

6
New cards

Join (⨝) Purpose

Combines tuples from two relations based on a join condition

7
New cards

Nested Loop Join

For each tuple in outer, scan entire inner; simple but slow

8
New cards

Block Nested Loop Join

Uses buffers to load blocks of outer and inner relation; reduces I/O

9
New cards

Index Nested Loop Join

Uses index on inner join key to improve performance

10
New cards

Sort-Merge Join

Sort both inputs on join key and then merge; good for pre-sorted data

11
New cards

Hash Join

Builds hash table on one relation, probes with the other; efficient for large joins

12
New cards

Join Output Size

Depends on join selectivity and number of matching tuples

13
New cards

Set Operations (∪, ∩, −)

Evaluated using sorting or hashing

14
New cards

Aggregation (SUM, COUNT, AVG)

Grouped using sorting or hashing on GROUP BY attributes

15
New cards

Group By with Sorting

Sort data by group attributes, then compute aggregates

16
New cards

Group By with Hashing

Use hash table keyed on group attributes; compute aggregates on the fly

17
New cards

Duplicate Elimination with Sorting

Sort input and scan to eliminate consecutive duplicates

18
New cards

Duplicate Elimination with Hashing

Hash input into buckets; eliminate duplicates within buckets

19
New cards

Evaluation Strategy

Goal is to minimize disk I/Os and use available memory efficiently

20
New cards

Materialization

Evaluate one operator fully, store results, pass to next operator

21
New cards

Pipelining

Pass intermediate results directly to next operator without writing to disk

22
New cards

Buffer Size Impact

More buffers = more efficient joins, fewer passes for sorting

23
New cards

Cost Factors

Disk I/O (dominant), CPU, memory usage

24
New cards

Selection Pushdown

Evaluate selections as early as possible to reduce intermediate results

25
New cards

Join Order Matters

Smaller intermediate results can drastically reduce query cost

26
New cards