embulk / embulk/embulk-output-jdbc
Redshift output process could be much more efficient.
- Dominant language
- Java
- Stars
- 92
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
The Redshift output process could be quite a bit more efficient.
Possible improvements, in order of difficulty:
• Add `ENCODE lzo` compression option to every column on the temp table.
º Writing to disk is typically one of the slowest parts of the `COPY` process.
• Load **all** extracts into a single temp table in Redshift.
º Redshift can load multiple files in parallel. This is best practice for `COPY` speed.
º Also the tables created are not true temp tables and incur significant creation overheard.
• Use `ALTER TABLE … APPEND` to move loaded data into final table rather than `INSERT INTO`
º This is a recent addition to Redshift. It moves the data for one table into another **logically** with no physical reading or writing of the data on disk. http://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_TABLE_APPEND.html
I'll try to create a pull request that addresses the issues.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Redshift output path that performs COPY, creates temporary tables, and inserts into the final table. Review the three proposed improvements in order, including the linked ALTER TABLE APPEND documentation. Done means the selected changes improve the output process without changing the resulting data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, java
- Domain
- databases, performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100