Database Statistics and Histogram Types

Explore the mechanics of how database optimizers use histograms, including equi-width, equi-height, and compressed types, to estimate selectivity and cardinality for query planning.

Sample Questions

  1. What is the primary purpose of database statistics for a query optimizer?

    • To store user credentials
    • To provide data distribution information for cost estimation
    • To encrypt sensitive data
    • To physicaly sort the data on disk
  2. Which metric represents the number of unique values in a column?

    • Density
    • Selectivity
    • Cardinality
    • Skewness
  3. What does a Frequency Histogram store?

    • The average length of strings in a column
    • The exact count of occurrences for each distinct value
    • The number of null values in a table
    • The physical location of blocks