2 ms·
> What’s wrong with CTEs though? At least in SQL Server CTE's are syntax level, so multiple uses of a CTE in a query causes it to get expanded in each of those
by RaftPeople 2y ago
> What’s wrong with CTEs though?
At least in SQL Server CTE's are syntax level, so multiple uses of a CTE in a query causes it to get expanded in each of those places, which typically increases the complexity of the query and can cause issues with the optimizer and performance.