![]() ![]() ![]() Use the Redshift Create Table LIKE clause when you want to create a table that inherits attributes such as Distribution Style, Sort Keys, NULL and Backup. The Create table LIKE clause is used to create a table based on the structure of a parent table, whereas the Create table AS (CTAS) clause is used to create a table based on a SQL query. This is a very important difference you have to remember! The Redshift Create Table LIKE clause is not the same as the Create Table AS clause. The keyword and syntax for setting distribution styles are listed below. The best use case for an ALL distribution style is when tables are not updated frequently. ALL distribution increases the storage requirements for a table, and also slows down DML queries. In an ALL distribution style, all rows of a table are copied to every single compute node.Key distribution is great if you plan on joining tables. ![]() The rows in the table are then distributed based on this column.
0 Comments
Leave a Reply. |