Log-Structured Storage and Compaction · graine 1 · A4, économe en encre. Le corrigé s'imprime sur sa propre page, pour les adultes.
En anglais

Write fast now, tidy up later

Informatique · Données et bases de données · de 22 à 24 ans
Nom ______________________   Date ____________
  1. Key k has an old copy in a run and a new copy in the memory table. Which value wins?

    • The oldest copy, it was written first
    • A mix of both copies
    • The newest copy in the memory table
  2. Where does a fresh write go first?

    • Into the oldest run on disk
    • Directly into a compacted level
    • Into the memory table
  3. Compaction merges sorted runs and drops shadowed copies.

    En entourer un :   Vrai   Faux

  4. A workload writes constantly and rarely reads. Which policy fits?

    • Tiered merging, which merges rarely
    • Leveled merging, which merges often
    • No compaction at all
  5. A read looks for a key stored in three runs. What must it do?

    • Check newest first and stop at the first copy found
    • Check oldest first and return the last copy
    • Read all three and average the values
  6. A run membership filter says the key is absent. What should the read do?

    • Scan the run anyway to be sure
    • Skip the run entirely
    • Compact the run first
  7. Reads are slow and each key spans many runs. Which change helps most?

    • Flush the memory table less often
    • Move toward leveled merging plus filters
    • Drop the membership filters to save memory
  8. Pat says leveled merging rewrites data less than tiered merging. What is wrong?

    • Leveled merging rewrites more, that is its price for short reads
    • Tiered merging never merges at all
    • Rewrites have no effect on write cost
LightMySky · lightmysky.comW1-mt_MDZ7MPNEhO-s1

Corrigé

Pour les adultes. Replier cette page avant de passer le reste.

Write fast now, tidy up later W1-mt_MDZ7MPNEhO-s1

  1. The newest copy in the memory table · Newer copies shadow older ones.
  2. Into the memory table · All writes start in memory, then flush as runs.
  3. Vrai · That tidy-up is the whole job of compaction.
  4. Tiered merging, which merges rarely · Rare merges keep write costs low.
  5. Check newest first and stop at the first copy found · Newest-first order finds the winning copy fast.
  6. Skip the run entirely · A no from the filter rules that run out.
  7. Move toward leveled merging plus filters · Fewer runs plus skippable runs shorten reads.
  8. Leveled merging rewrites more, that is its price for short reads · Frequent merges are exactly what leveled pays with.