this could be due to primary index. Here name is your primary index. If you do not explicitly mention primary index, then your first column will become primary index. Is your name column unique, if not, it will leading to skewing , which in turn will effect your performance. If I were you, I will do few changes.
1. I will create your volatile table as multiset table with no primary index. (no PI is best for staging tables as data can be inserted fastly because data can be loaded into this tables randomly). Multiset table will not check for duplicate records further enhancing performance. If you do not mention set or multiset table in ANSI mode, set tables are created, Set tables will check for duplicates )
2. I will name as varchar(10) instead of char(10)
please check the code below.
proc sql;
connect to teradata(SERVER=ABCD USER=XXXX PASSWORD=XXXXXX CONNECTION=GLOBAL);
execute
(CREATE multiset VOLATILE TABLE temp1(NAME VARCHAR(10), STATE CHAR(3))
NO PRIMARY INDEX ON COMMIT PRESERVE ROWS) by teradata;
execute ( COMMIT WORK ) by teradata;
quit;
... View more