Hacker GitHub

← All repos

ethan-seal/ors_expensive

View on GitHub ↗ ★ 2 Shell

Example benchmark of OR queries being expensive

3 mentions on Hacker News by 1 person: 0 stories, 3 comments · first 2025-09-29 · latest 2025-09-30

Mentions per year 3 mentions · busiest year 2025 (3)
20082026
  1. Exactly the same one from what I see: https://github.com/ethan-seal/ors_expensive/blob/main/explai... Given the buffer reads seem close to yours, I believe it's page cache.
    comment by ethanseal · 2025-09-30 · in A SQL Heuristic: ORs Are Expensive
  2. …setup.sql, the cache will be warmish - I get 4ms on the first run. I'm using postgres 17.5 See https://github.com/ethan-seal/ors_expensive/blob/main/benchm... where I use dd to clear the os page cache. This article by pganalyze talks about…
    comment by ethanseal · 2025-09-30 · in A SQL Heuristic: ORs Are Expensive
  3. …Is there another optimization I'm missing? The article links to my code for my timings here: https://github.com/ethan-seal/ors_expensive There is an optimization that went in the new release of PostgreSQL I'm excited about that may affect…
    comment by ethanseal · 2025-09-29 · in A SQL Heuristic: ORs Are Expensive