1
Clustering on user_id helps aggregation but not partition pruning. Check INFORMATION_SCHEMA.JOBS for the actual pruning stats.
Table is partitioned on event_date (DATE). Query uses WHERE event_date = CURRENT_DATE() - 1 but bytes billed is still ~2TB.
SELECT user_id, COUNT(*) FROM events
WHERE event_date = DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY)
GROUP BY 1;Partition field is DATE, not TIMESTAMP. What am I missing?
Clustering on user_id helps aggregation but not partition pruning. Check INFORMATION_SCHEMA.JOBS for the actual pruning stats.
If event_date is derived and you filter on ingest_time somewhere else in the pipeline, partition pruning won't help. Confirm the filter column really is the partition column with no function wrapping it.
Sign in to reply.