Can you explain the COPY command and how to optimize bulk loading into Redshift?
1
Times asked
Jul 2026
Last seen
Jul 2026
First seen
💡 Model Answer
The COPY command in Amazon Redshift loads data from external sources (S3, EMR, DynamoDB, or other Redshift clusters) into a target table. It is highly parallelized and can ingest terabytes of data quickly.
Key syntax:
sql
COPY target_table
FROM 's3://bucket/path/'
CREDENTIALS 'aws_iam_role=arn:aws:iam::123456789012:role/MyRedshiftRole'
FORMAT AS CSV
DELIMITER ','
IGNOREHEADER 1
TIMEFORMAT 'auto'
COMPUPDATE ON
STATUPDATE ON;
Optimization tips:
The overall complexity is O(n) where n is the number of rows, but the actual throughput depends on the number of slices, file size, and network bandwidth.
Sign in to unlock the rest of this answer
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.
Get Assisting AI — Starts at ₹500