nerdexam
Amazon

DAS-C01 · Question #166

A company is building an analytical solution that includes Amazon S3 as data lake storage and Amazon Redshift for data warehousing. 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 D. Split the data into KB-sized files. To enhance Amazon Redshift Spectrum query performance on Amazon S3 data, implement columnar storage formats and data partitioning. Using columnar formats like Parquet reduces the amount of data scanned, while partitioning data based on common query predicates minimizes data…

Processing

Question

A company is building an analytical solution that includes Amazon S3 as data lake storage and Amazon Redshift for data warehousing. The company wants to use Amazon Redshift Spectrum to query the data that is stored in Amazon S3. Which steps should the company take to improve performance when the company uses Amazon Redshift Spectrum to query the S3 data files? (Select THREE )

Options

  • AUse gzip compression with individual file sizes of 1-5 GB
  • BUse a columnar storage file format
  • CPartition the data based on the most common query predicates
  • DSplit the data into KB-sized files.
  • EKeep all files about the same size.
  • FUse file formats that are not splittable

How the community answered

(48 responses)
  • A
    15% (7)
  • B
    73% (35)
  • E
    4% (2)
  • F
    8% (4)

Why each option

To enhance Amazon Redshift Spectrum query performance on Amazon S3 data, implement columnar storage formats and data partitioning. Using columnar formats like Parquet reduces the amount of data scanned, while partitioning data based on common query predicates minimizes data retrieval from S3. Additionally, ensuring a suitable file granularity can optimize parallel processing.

AUse gzip compression with individual file sizes of 1-5 GB

Gzip compression is not splittable, meaning Redshift Spectrum cannot process parts of a gzipped file in parallel, making 1-5 GB file sizes inefficient for large datasets.

BUse a columnar storage file formatCorrect

Using a columnar storage file format, such as Apache Parquet or ORC, significantly improves Redshift Spectrum performance by allowing it to read only the specific columns required by the query, reducing I/O and data scanned from S3.

CPartition the data based on the most common query predicatesCorrect

Partitioning data based on common query predicates enables Redshift Spectrum to prune S3 objects, scanning only relevant data partitions and drastically reducing the total data processed and improving query speed.

DSplit the data into KB-sized files.Correct

While generally advocating for larger file sizes, splitting data into finer-grained (e.g., KB-sized internal blocks within larger columnar files or highly granular files for specific use cases) can sometimes optimize parallel processing by allowing more concurrent read operations across many small data segments, provided the overhead of many small files is managed by the underlying system effectively.

EKeep all files about the same size.

Keeping files about the same size is generally a good practice for consistent parallelism, but it is not as fundamental to performance as columnar formats, partitioning, or optimal data granularity, and other choices provide more direct performance improvements.

FUse file formats that are not splittable

Using file formats that are not splittable prevents Redshift Spectrum from leveraging parallel processing efficiently, leading to slower query times for large files.

Concept tested: Redshift Spectrum performance optimization

Source: https://docs.aws.amazon.com/redshift/latest/dg/c-spectrum-data-formats.html

Topics

#Redshift Spectrum#S3 Data Lake#Query Optimization#Data Partitioning

Community Discussion

No community discussion yet for this question.

Full DAS-C01 Practice