โ† All Data Engineering Flashcard Decks

Optimizing Query Performance Flashcards

7 cards from real Data Engineering practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Optimizing Query Performance flashcards as text
  1. A query filtering on a high-cardinality column does a full table scan despite an index existing. What is the MOST likely cause?

    Answer: The index is on a different column than the predicate

    If the index does not cover the filtered column, the planner cannot use it and falls back to a scan.

  2. Which join strategy is typically fastest when joining a very large table to a very small lookup table?

    Answer: Broadcast (map-side) join

    Broadcasting the small table to every node avoids shuffling the large table.

  3. What does pushing a WHERE filter down to the storage/scan layer (predicate pushdown) primarily reduce?

    Answer: Rows read and transferred upward

    Predicate pushdown filters early so fewer rows move through the pipeline.

  4. A columnar format like Parquet improves analytical query speed mainly because it allows:

    Answer: Reading only the columns a query needs

    Columnar storage lets engines skip unreferenced columns, cutting I/O.

  5. Stale table statistics most directly cause which problem?

    Answer: Poor planner cardinality estimates and bad plans

    The optimizer relies on statistics to estimate row counts and choose plans.

  6. Which is the best first step when a query is suddenly slow in production?

    Answer: Examine the query execution plan

    The execution plan reveals scans, join methods, and bottlenecks before any change.

  7. Partition pruning speeds up queries by:

    Answer: Skipping partitions that cannot match the filter

    When a query filters on the partition key, the engine reads only relevant partitions.