title: How to avoid skewing in redshift for Big Tables?
body: <p>I wanted to load the table which is having a table size of more than 1 TB size from S3 to Redshift.</p>
  
  <p>I cannot use DISTSTYLE as ALL because it is a big table.</p>
  
  <p>I cannot use DISTSTYLE as EVEN because I want to use this table in joins which are making performance issue.</p>
  
  <p>Columns on my table are </p>
  
  <p>id INTEGER, name VARCHAR(10), another_id INTEGER, workday INTEGER, workhour INTEGER, worktime_number INTEGER</p>
  
  <p>Our redshift cluster has 20 nodes.</p>
  
  <p>So, I tried distribution key on a workday but the table is badly skewed.</p>
  
  <p>There are 7 unique work days and 24 unique work hours.</p>
  
  <p>How to avoid the skew in such cases?</p>
  
  <p>How we avoid skewing of the table in case of an uneven number of row counts for the unique key (let's say hour1 have 1million rows, hour2 have 1.5million rows, hour3 have 2million rows, and so on)?</p>