|
|
Archives of the TeradataForum
Message Posted: Wed, 30 Jul 2003 @ 12:35:30 GMT
Subj: | | Re: Moving Data Due to PI Restructuring |
|
From: | | Geoffrey Rommel |
| Will the CREATE TABLE .... WITH DATA , be faster than a Insert/Select? | |
It won't be faster; it will take the same amount of time, assuming you specify the same primary index. I would recommend, however,
that you create the table first and then insert/select. CREATE TABLE...WITH DATA can sometimes do unexpected things to your column
definitions. For instance, did you know that, in the definition shown below, the 'gender' column will be Unicode?
create table mytable
as
(select ...
,case
when source_column = 1 then 'Male'
when source_column = 2 then 'Female'
when source_column = 3 then 'Hermaphrodite'
else 'Unknown'
end as gender
,...) with data ...;
| |