Learn Labs
Query Speed

Self-test

Check your understanding

Self-test6 questions

—/6
  1. Why did the first schema benchmark report that a lookup on a non-key column read only 1.7 M of 20 M rows?

  2. A table sorted by (user_id, ts) answers per-user queries from 8,192 rows. Why does the same table read all 20 M rows for a per-country query?

  3. Why did the bloom filter on url skip almost nothing while the one on user_id skipped most of the table?

  4. The materialized view made a counts query 5x faster but a p95 query barely faster. What was in the view's table?

  5. Why did system.parts show no extra disk for a projection, and where is its size?

  6. Design question

    A product has a per-user activity page and a per-country dashboard over the same events. Design the table, the projections or views, and say what each costs.