Question 44: While creating a table in Redshift cluster you can define the distribution styles for that table like EVEN, KEY and ALL. Which of the following statement is/are true when you use the ALL distribution style?

A. A copy of the entire table is distributed to every node.

B. Use this style when tables that are not updated frequently.

C. This table can exists only on one node and all the queries will be executed on that node only.

D. Use this style when tables that are updated frequently.

1. A,B

2. B,C

3. C,D

4. A,D

5. B,D

Correct Answer : 1 Exp : If you dont specify a distribution style with the CREATE TABLE statement, Amazon Redshift applies automatic distribution.

With automatic distribution, Amazon Redshift assigns an optimal distribution style based on the size of the table data. For example, Amazon Redshift initially assigns ALL distribution to a small table, then changes to

EVEN distribution when the table grows larger. When a table is changed from ALL to EVEN distribution, storage utilization might change slightly. The change in distribution occurs in the background, in a few seconds.

Amazon Redshift never changes the distribution style from EVEN to ALL.

Even distribution

The leader node distributes the rows across the slices in a round-robin fashion, regardless of the values in any particular column. EVEN distribution is appropriate when a table does not participate in joins or when

there is not a clear choice between KEY distribution and ALL distribution.

Key distribution

The rows are distributed according to the values in one column. The leader node places matching values on the same node slice. If you distribute a pair of tables on the joining keys, the leader node collocates the

rows on the slices according to the values in the joining columns so that matching values from the common columns are physically stored together.

ALL distribution

A copy of the entire table is distributed to every node. Where EVEN distribution or KEY distribution place only a portion of a tables rows on each node, ALL distribution ensures that every row is collocated for every

join that the table participates in.

ALL distribution multiplies the storage required by the number of nodes in the cluster, and so it takes much longer to load, update, or insert data into multiple tables. ALL distribution is appropriate only for

relatively slow moving tables; that is, tables that are not updated frequently or extensively. Small dimension tables do not benefit significantly from ALL distribution, because the cost of redistribution is low.

1