4 ms·
My problem with views is that you do the join before the filtering.
by wodenokoto 7y ago
My problem with views is that you do the join before the filtering.
- mumblemumble 7y agoI'm curious, what DBMS are you using whose optimizer can't see through views? For what it's worth, MSSQL, PostgreSQL and Oracle don't have that limitation.
- wodenokoto 7y agoBigquery. If a make a view that joins table a and b, and I query that view with a filter, bigquery won’t push the filtering down unto a and b and then join.
- mumblemumble 7y agoAh. That's not too surprising, then, is it? Bigquery's column-oriented, so I imagine efficient row-selective queries isn't really what it's for in the first place.
- solidangle 7y agoAny query optimizer worth its salt will push the filters below the join.
- buremba 7y agoPredicate pushdown is one of the first optimizations implemented in SQL planners and all the OLAP and OLTP solutions that I'm aware of already have this feature in place.