2 ms·
This is a very pessimistic argument, undermined by the fact that every single day, humans rewrite queries - in the supposedly declarative language SQL - to be i
by thom 4y ago
This is a very pessimistic argument, undermined by the fact that every single day, humans rewrite queries - in the supposedly declarative language SQL - to be identical but faster. I want a query planner that can be told to go away and try to do better with more resources. I don't know why this is unthinkable.
- ttfkam 4y agoYes, just like in browsers where one API is faster in Chrome and slower in Firefox or vice versa. Then Safari drops in and completely upends the notion of "best strategy". The underlying implementation will always affect top level access performance. "Best" will always be implementation dependent. That said, the DBs I use most (Postgres, MySQL, SQLite, and their derivatives) have pretty consistently improved performance from version to version with surprisingly few regressions. Also there have been more "knobs and dials" added to get what you want. WITH foo MATERIALIZED AS … springs immediately to mind. The ability to set or remove an optimization fence does wonders while still maintaining SQL's declarative roots.