We will adjust our tables to get the maximum from Redshift in terms of a place for computing, and, allow Tableau to efficiently render the results and visualize it as follows:
- To choose the right sort key, we should evaluate our queries to find a date column that we are using for filters (the WHERE condition in SQL). For our huge fact table, it is the lo_orderdate column. For the remaining dimension tables, we will use their primary key as a sort key: p_partkey, s_supkey, d_datekey.
- Then, we will choose candidates for the sort key. The following are the three types of distribution available in Redshift:
- The key distribution
- The all distribution
- The even distribution
You can learn more about Redshift distribution at the ...