Redshift Query performance tuning tips
Clustered vs Serverless Redshift:
- In a provisioned cluster, the resources allocated are predefined which can sometimes become bottleneck when running heavy workloads. However, Serverless Redshift can scale up dynamically according to the workload which can increase efficiency and saves money
Order of Joins in SQL Query:
- Always try to start joining tables with less data first and then move to the tables with alot of data
CTE vs Temp table:
- Both CTE and temp table are good but try to use CTE's when you are dealing with less data. Use temp tables in your query when you are dealing with a lot of data.