exam questions

Exam AWS Certified Data Engineer - Associate DEA-C01 All Questions

View all questions & answers for the AWS Certified Data Engineer - Associate DEA-C01 exam

Exam AWS Certified Data Engineer - Associate DEA-C01 topic 1 question 139 discussion

A company stores employee data in Amazon Resdshift. A table names Employee uses columns named Region ID, Department ID, and Role ID as a compound sort key.

Which queries will MOST increase the speed of query by using a compound sort key of the table? (Choose two.)

  • A. Select *from Employee where Region ID=’North America’;
  • B. Select *from Employee where Region ID=’North America’ and Department ID=20;
  • C. Select *from Employee where Department ID=20 and Region ID=’North America’;
  • D. Select *from Employee where Role ID=50;
  • E. Select *from Employee where Region ID=’North America’ and Role ID=50;
Show Suggested Answer Hide Answer
Suggested Answer: BE 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
teo2157
Highly Voted 8 months, 2 weeks ago
Selected Answer: AB
To maximize the speed of queries using a compound sort key in Amazon Redshift, you should structure your queries to take advantage of the order of the columns in the sort key. The most efficient queries will filter or join on the columns in the same order as the sort key. Saying that, the most efficient queries would be: SELECT * FROM Employee WHERE Region_ID = 'region1' AND Department_ID = 'dept1' AND Role_ID = 'role1'; SELECT * FROM Employee WHERE Region_ID = 'region1' AND Department_ID = 'dept1'; SELECT * FROM Employee WHERE Region_ID = 'region1';
upvoted 7 times
...
antun3ra
Highly Voted 8 months, 2 weeks ago
Selected Answer: BE
To maximize the speed of queries by using the compound sort key (Region ID, Department ID, and Role ID) in the Employee table in Amazon Redshift, the queries should align with the order of the columns in the sort key.
upvoted 6 times
...
minhhnh
Most Recent 3 months, 3 weeks ago
Selected Answer: BC
The filter order in the query is irrelevant to the performance because the sort key itself determines the storage order. So the execution plan is the same
upvoted 2 times
...
HagarTheHorrible
4 months, 1 week ago
Selected Answer: AB
E is not optimal bc of skipping of the second column.
upvoted 1 times
...
altonh
4 months, 2 weeks ago
Selected Answer: BC
The execution plan of these 2 queries should be the same.
upvoted 2 times
...
RockyLeon
5 months ago
Selected Answer: BC
sort key works best with the first column in the sort key and continuing in sequential order
upvoted 2 times
...
michele_scar
5 months, 1 week ago
Selected Answer: AB
The order is the key to speed up queries
upvoted 2 times
...
Parandhaman_Margan
6 months ago
Answer:AB A:This query filters by Region ID, which is the first column in the compound sort key. Queries filtering on the leading sort key column(s) will benefit from optimized performance because the data can be quickly located. B: This query filters by both Region ID (the first column) and Department ID (the second column) in the sort key. This further narrows down the search space, leading to even faster query performance.
upvoted 4 times
...
tucobbad
6 months ago
Selected Answer: BC
I would vote for B and C. I've tested with a compound sort key (3 columns) and even inverting predicate order the explain plan was the same.
upvoted 4 times
...
Shanmahi
8 months, 3 weeks ago
Selected Answer: BE
Based on the order of the compound sort key columns.
upvoted 5 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago