Performance Hints for BigQuery
trmlabs.com·3h·
Discuss: Hacker News
🚀Query Optimization
Preview
Report Post

Key takeaways

  • Optimize slot time, not data scanned: Slot time consumed determines cost under capacity pricing, not bytes processed.
  • Encode hex as binary: 50-800% size reduction: Convert hex to BYTES (50% savings) or 64-bit integers for joins (8x reduction).
  • Always filter on partitions: 75x scan reduction: Partition filtering is the highest-impact optimization—avoid full table scans.
  • Salt hot join keys to eliminate skew: Distribute hot keys across partitions for parallel processing (8x speedups).
  • Avoid inequality joins — they trigger CROSS JOINs: Pre-compute with window functions, then join on equality.

{{horizontal-line}}

Jeff Dean and Sanjay Ghemawat’s "Performance Hints" document jus…

Similar Posts

Loading similar posts...