146 - 208: Cost Estimation Flashcards

1
Q

Q: What is selectivity estimation in query optimization?

A

It is the process of estimating how many tuples are expected in a query result or intermediate results. It uses data statistics and assumptions about predicates to guide optimization.

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

What are equi-width histograms?

A

Histograms where all buckets have the same width in the domain. They are used for summarizing data distributions.

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

Which error metric calculates the average squared difference between actual and estimated values?

A

Mean Squared Error (MSE).

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

What does the term “wavelet transform” represent?

A

A mathematical technique that decomposes data into resolution averages and detail coefficients, useful for selectivity estimation.

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

What are the advantages of histograms in databases?
A) Compact representation of data.
B) Allows estimation of point and range queries.
C) Fits all data perfectly without error.
D) Enables efficient storage and lookup.

A

A, B and D

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

Explain the concept of “V-Optimal histograms.”

A

These histograms minimize the Sum Squared Error (SSE) for a given number of buckets, providing optimal data representation.

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

What is the primary role of the FM-sketch in probabilistic counting?

A

To estimate the number of distinct values in a dataset using bit vectors and hashing.

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

What influences the cost of query evaluation plans?
A) Size of intermediate results.
B) Availability of indices.
C) Execution time only.
D) Memory and system statistics.

A

A, B and D

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

How does the CM-sketch estimate frequencies?

A

By using a two-dimensional array of counters indexed by hash functions, with estimates derived from the minimum value across rows.

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