In February, Amazon released some interesting features related Amazon Redshift. One of them is a new DDL, “ALTER TABLE APPEND”. When you need to migrate data from one table to another, you can use the “CREATE TABLE AS” statement. But there are situations where the query can be quite sluggish, especially when the source table is too large. As in most cases, copying large quantities of data can be time-consuming and cumbersome. The new “ALTER TABLE APPEND" function enables you to move records from source to target, instead of copying the records. This allows you to move the data much faster and more efficiently.
The feature does have some restrictions. Your source and destination table must have same columns and data types. It has some flexibility for mismatches when using options such as “IGNOREEXTRA” or “FILLTARGET” when both tables are not conforming.
Pro Tip: When you have operations running in a data warehouse, be caution of how you perform your data writing since it’s generally the most expensive operation. Extra efforts and thoughtful thinking earlier in your efforts will save you time in the future. Click here for more details.