Posts about the optimizer

Cost-based optimizer in Presto

less than 1 minute read

The multiyear effort started at Teradata and continued at Starburst is getting close to its final shape. Even though it is in the initial version of cost-based optimizer we were able to see really nice speedups in TPCH and TPCDS benchmarks (up to 10-15x). It is a great foundation for more optimizations in the future. I can’t wait to see it working at production and to get first feedback from Presto users.


Unnecessary cross join elimination

5 minute read

Cross join has a bad reputation. It is not that nobody likes it all the time. For example It is OK to use it from time to time. There are even some queries where there is no other way. All of it is totally acceptable, and nobody would complain if it would be only like that. However, cross join has a habit to occur at the least appropriate moment. And once it comes, nothing remains the same. Query usually becomes an order of magnitude slower, and this not something any of you would like to dream of.

Since the 0.162 and 0.157t (Teradata) version of Presto, there is a feature called unnecessary cross join elimination. Si...