by twoodfin · 5y ago · 0 comments
The problem is the more optimizations you implement the more possibilities the query planner has to evalue which may result in (1) a too long query planning phase or (2) the possibility of de-optimizing a good query because an optimization was falsely predicted to be faster
Additionally, in this example, the rewritten query is easier to read and maintain.