PostgreSQL - Common Table Expressions
You have this query in PostgreSQL 11:
WITH cte AS (SELECT * FROM orders WHERE total > 100) SELECT * FROM cte JOIN customers ON cte.customer_id = customers.id WHERE customers.region = 'East';
The query is slower than expected. What change can improve performance?
WITH cte AS (SELECT * FROM orders WHERE total > 100) SELECT * FROM cte JOIN customers ON cte.customer_id = customers.id WHERE customers.region = 'East';
The query is slower than expected. What change can improve performance?
