- Newest
- Most votes
- Most comments
Try running VACUUM and ANALYZE. This can help re-sort the tables and update statistics, which might improve performance.
VACUUM FULL;
ANALYZE;
Hello,
In Redshift data distribution happens across slices. A compute node is partitioned into slices. Each slice is allocated a portion of the node's memory and disk space, where it processes a portion of the workload assigned to the node. The leader node manages distributing data to the slices and apportions the workload for any queries or other database operations to the slices. The slices then work in parallel to complete the operation.
The number of slices per node is determined by the node size of the cluster. For more information about the number of slices for each node size, refer the doc. To check the number of slices for each node, please run below query
select * from stv_slices;
Please see if the slices are equally distributed across all compute nodes.
When you create a table, you can optionally specify one column as the distribution key. When the table is loaded with data, the rows are distributed to the node slices according to the distribution key that is defined for a table. Choosing a good distribution key enables Amazon Redshift to use parallel processing to load data and run queries efficiently. In case of even data will be evenly distributed across all slices. When you choose ALL based distribution, a copy of the entire table is distributed to every node.
Then run query from link to get data distribution across slices. Result will show table wise distribution across slice. Use this information to identify the table/s with uneven distribution.
Relevant content
- asked 3 years ago
- asked 4 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 5 months ago

I am running daily analyze for tables with >5% stat_off or >5% unsorted, ran a vacuum FULL 100 percent on those tables that I switched to EVEN after changing the diststyle. No difference