How often is the query plan optimal?

3 eatonphil 1 6/30/2025, 3:19:27 PM vondra.me ↗

Comments (1)

alexisread · 1h ago
TBH this is a good case for Linq-style queries, over SQL-based ones. Linq style allows you to narrow the query deterministically vs Sql eg. Mytable1.select().where().join(mytable2)

This applies the filter before the join, compared with:

Select from mytable1 join mytable2 on... Where...

Which relies on the query plan to resolve the correct application of where, and hope it puts the where before the join.

This becomes more important in the cloud, where Iceberg tables cannot be benchmarked in the same way as single-cluster relational DBs.