3 ms·
I don't know if it's the same for MySQL, but in Postgres a CTE would possibly force the planner to make less efficient choices [1]. Would be interesting if some
by aledalgrande 4y ago
I don't know if it's the same for MySQL, but in Postgres a CTE would possibly force the planner to make less efficient choices [1]. Would be interesting if someone who knows more than me could clarify on this
[1] https://hakibenita.com/be-careful-with-cte-in-postgre-sql https://hakibenita.com/be-careful-with-cte-in-postgre-sql
- Lukas_Skywalker 4y agoThis changed in version 12. See the disclaimer: This article is intended for PostgreSQL versions 11 and prior. Starting at version 12, PostgreSQL changed the way it treats CTE to prevent the issues described in this article.
- aledalgrande 4y agoOhhh nice catch!