Loading data into Orderkey and VACUUM
I am uploading a night shot of a table to Redshift. I added a column called "rundate" at the end of the table, which is just displayed when the data has been fetched through my ETL process. It is also the main sorting key.
The tables keep getting longer and longer every night, and many have more than 400 columns.
I am currently using FILLRECORD along with EMPTYASNULL to get NULLS in the table, and once the COPY command has finished, I use
update table set rundate = 'date' where rundate is NULL
to have the correct snapshot date.
I am wondering if it still counts as "loading data in sort order" where I would not need to evacuate. In addition, no updates / deletions are performed on any of the records.
source to share