Apuntes
Amazon Redshift DISTSTYLE: EVEN, KEY and ALL distribution
Contenido del apunte (3)
Página 1
DISTSTYLE defines the data distribution style for the whole table.
Amazon Redshift distributes the rows of a table to the compute nodes according to the distribution style specified for the table.
The distribution style that you select for tables affects the overall performance of your database.
DISTSTYLE EVEN - 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.
DISTSTYLE KEY - 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 slice according to the values in the joining columns so that matching values from the common columns are physically stored together.
DISTSTYLE ALL - A copy of the entire table is distributed to every node.
Where EVEN distribution or KEY distribution place only a portion of a table's rows on each node, ALL distribution ensures that every row is collocated for every join that the table participates in.
ALL distribution is appropriate only for relatively slow-moving tables; that is, tables that are not updated frequently or extensively.
Because the cost of redistributing small tables during a query is low, there isn't a significant benefit to define small dimension tables as DISTSTYLE ALL.
Página 2
Amazon Redshift can automatically sort and perform a VACUUM DELETE operation on tables in the background.
To clean up tables after a load or a series of incremental updates, you can also run the VACUUM command, either against the entire database or against individual tables.
Only the table owner or a superuser can effectively vacuum a table.
If you don't have owner or superuser privileges for a table, a VACUUM operation that specifies a single table fails.
If you run a VACUUM of the entire database without specifying a table name, the operation completes successfully.
However, the operation has no effect on tables for which you don't have owner or superuser privileges.
The VACUUM process re-sorts rows and relciams space in either a specified table or all tables in the current database in Amazon Redshift.
By default, VACUUM skips the sort phase for any table where more than 95% of the table's rows are already sorted.
Skipping the sort phase can significantly improve VACUUM performance.
It can slow down because of the following reasons:
A high percentage of unsorted data.
Large table with too many columns.
Interleaved sort key usage.
Irregular or infrequent use of VACUUM.
Concurrent tables, cluster queries, DDL statements, or ETL jobs.
Use the svv_vacuum_progress query to check the status and details of your VACUUM operation.
It is recommended to use the VACUUM command with the BOOST option.
The BOOST option allocates additional resources to VACUUM, such as available memory and disk space.
With the BOOST option, VACUUM operates in one window and blocks concurrent deletes and updates for the duration of the VACUUM operation.

Página 3
Amazon EMR is a managed cluster platform that simplifies running big data frameworks, such as Apache Hadoop and Apache Spark, on AWS to process and analyze vast amounts of data.
By using these frameworks and related open-source projects, such as Apache Hive and Apache Pig, you can process data for analytics purposes and business intelligence workloads.
Amazon EMR is ideal for problems that necessitate the fast and efficient processing of large amounts of data.
The web server interfaces allow you to build processing workflows and programmatically monitor the progress of running clusters.
You can also use the simple web interface of the AWS Management Console to launch your clusters and monitor processing-intensive computation on clusters of Amazon EC2 instances.
To encrypt the root volume of the EMR clusters, you need to create a security configuration.
Información
- Descripción
- Apunte sobre Sin título, creado por Shawn Deo el 02/03/2021.
- Creado por
- Shawn Deo · mar 2021
- Actualizado
- 2 mar 2021
- Visitas
- 0
- Valoración