DEA-C01 · Question #65
A company is building an analytics solution. The solution uses Amazon S3 for data lake storage and Amazon Redshift for a data warehouse. The company wants to use Amazon Redshift Spectrum to query the
The correct answer is B. Use a columnar storage file format. C. Partition the data based on the most common query predicates.. To achieve the fastest queries when using Amazon Redshift Spectrum to query data in Amazon S3, it is crucial to use a columnar storage file format and partition the data based on the most common query predicates.
Question
A company is building an analytics solution. The solution uses Amazon S3 for data lake storage and Amazon Redshift for a data warehouse. The company wants to use Amazon Redshift Spectrum to query the data that is in Amazon S3. Which actions will provide the FASTEST queries? (Choose two.)
Options
- AUse gzip compression to compress individual files to sizes that are between 1 GB and 5 GB.
- BUse a columnar storage file format.
- CPartition the data based on the most common query predicates.
- DSplit the data into files that are less than 10 KB.
- EUse file formats that are not splittable.
How the community answered
(36 responses)- A3% (1)
- B78% (28)
- D11% (4)
- E8% (3)
Why each option
To achieve the fastest queries when using Amazon Redshift Spectrum to query data in Amazon S3, it is crucial to use a columnar storage file format and partition the data based on the most common query predicates.
While file size optimization is important, using gzip compression for individual files between 1 GB and 5 GB without ensuring splittability can still hinder parallel processing, and this alone is less impactful than columnar formats and partitioning for overall query speed.
Columnar storage file formats like Parquet or ORC improve query performance significantly for Redshift Spectrum by allowing it to read only the columns relevant to a query, minimizing data transfer and processing.
Partitioning data in S3 based on frequently used query predicates reduces the amount of data that Redshift Spectrum needs to scan, as it can prune partitions and only access the relevant subsets of data, leading to faster query execution.
Splitting data into files less than 10 KB creates a "small file problem," leading to excessive metadata operations and inefficiencies for Redshift Spectrum, which significantly degrades query performance.
Using file formats that are not splittable prevents Redshift Spectrum from processing data in parallel across multiple nodes, forcing it to read entire files and significantly hindering query performance.
Concept tested: Redshift Spectrum query optimization
Source: https://docs.aws.amazon.com/redshift/latest/dg/c-getting-started-spectrum.html
Topics
Community Discussion
No community discussion yet for this question.