Marks where the usage of CLUSTER BY may cause performance issues.
Example Code
Teradata:
IN -> Teradata_01.sql
CREATE MULTISET TABLE T_2008,NO FALLBACK,NOBEFORE JOURNAL,NOAFTER JOURNAL,CHECKSUM=DEFAULT,DEFAULT MERGEBLOCKRATIO( COL1 NUMBER(20,0) NOT NULL, COL2 INTEGER, COL3 VARCHAR(4) CHARACTERSET LATIN NOT CASESPECIFIC, COL4 DATE FORMAT 'YYYY-MM-DD')PRIMARYINDEX( COL1, COL2)PARTITIONBY ( RANGE_N(COL4 BETWEENDATE'2010-01-01'ANDDATE'2025-12-31' EACH INTERVAL '1'YEAR ),CASE_N(COL3 ='T',COL3 ='M',COL3 ='L') ); -- PARTITION BY transformed to CLUSTER BY
Snowflake Scripting:
OUT -> Teradata_01.sql
CREATE OR REPLACETABLET_2008( COL1 NUMBER(20,0) NOT NULL, COL2 INTEGER, COL3 VARCHAR(4) COLLATE'en-cs', COL4 DATE)--** SSC-PRF-TD0001 - PERFORMANCE REVIEW - CLUSTER BY **CLUSTER BY (RANGE_N(COL4 BETWEENDATE'2010-01-01'ANDDATE'2025-12-31' EACH INTERVAL '1'YEAR ),CASE_N(COL3 ='T',COL3 ='M',COL3 ='L'))COMMENT = '{ "origin": "sf_sc", "name": "snowconvert", "version": { "major": 0, "minor": 0, "patch": "0" }, "attributes": { "component": "teradata", "convertedOn": "06/17/2024" }}'
; -- PARTITION BY transformed to CLUSTER BY
Recommendations
Review the code in order to identify possible performance issues. More information about this topic can be read here.