datamill-co / target-redshift

A Singer.io Target for Redshift
MIT License
23 stars 17 forks source link

Performance: Use `CREATE TABLE ... LIKE ...` #30

Closed AlexanderMann closed 5 years ago

AlexanderMann commented 5 years ago

Motivation

While working on https://github.com/datamill-co/target-snowflake/pull/12 we figured out that leveraging the SQLInterface table upsert logic is far slower for the tmp staging tables than using a single command in remote.

Snowflake has the CREATE TABLE ... LIKE ... syntax that Postgres has as well.

AlexanderMann commented 5 years ago

https://stackoverflow.com/a/44318466