Indexing and Query Optimization Lecture Notes

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

1/9

flashcard set

Earn XP

Description and Tags

Flashcards about Indexing and Query Optimization.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

What is the primary purpose of indexing in a database?

To improve query performance by reducing data retrieval time without scanning the entire table.

2
New cards

What is a clustered index?

An index that physically sorts the data rows in the table based on key values.

3
New cards

How many clustered indexes can exist per table and why?

Only one, because data rows can be physically sorted in only one way.

4
New cards

What is a non-clustered index?

An index that contains a separate structure to store index keys and pointers to actual data rows.

5
New cards

How many non-clustered indexes can exist per table?

Multiple non-clustered indexes can exist per table.

6
New cards

What is a B-Tree index?

A balanced tree structure that maintains sorted data for quick data retrieval, commonly used for both clustered and non-clustered indexes.

7
New cards

For what type of searches are hash indexes most efficient?

Equality searches.

8
New cards

Name three actions involved in query processing.

Validating SQL statements, query rewriting for simplification, and generating execution plans.

9
New cards

What is predicate pushdown in query optimization?

Filtering data early in the query process.

10
New cards

Why is it important to regularly update statistics in a database?

To assist the optimizer in selecting the most efficient execution plan.