APPENDIX · P2 · INDEX · GO TO SLIDE 13
← Back to Slide 13
P2. Which granules did the index discard?
EXPLAIN indexes = 1
SELECT count() FROM events
WHERE event_type = 'purchase'
AND toDate(ts) = '2026-09-15';
EXPLAIN indexes = 1
SELECT count() FROM events
WHERE player_id = 1042;
What the result should be
-- первый запрос, фрагмент
MinMax Parts: 1/3
Granules: 301/624
PrimaryKey Keys: event_type, toDate(ts)
Granules: 1/301
-- второй запрос, фрагмент
PrimaryKey Keys: player_id
Granules: 220/624
MinMax by ts
Key prefix
Third column
Based on the minimum and maximum dates in each section, August and October were excluded—even before the initial index was calculated.
Key prefix condition: A search by tags returns one granule out of 301.
Checking tag ranges: 220 out of 624 tags were read.
The database contains three partitions: August, September, and October 1. So there are 624 granules, not 612 as shown on the slide13—before October was added.