|
|
Archives of the TeradataForum
Message Posted: Wed, 03 Sep 2003 @ 07:44:20 GMT
Subj: | | Re: CREATE TABLE AS : Primary Index and Compressed Columns |
|
From: | | Dieter Noeth |
Michael Larkins wrote:
| I understand that you feel that an issue of compression is causing you a problem here. However, what I do not understand is why you
would do the CREATE TABLE AS with a derived table (select) and then use the WITH NO DATA. | |
There's one big disadvantage of WITH DATA: the table is not visible before the data has been merged into it. You can't use dbc.tablesize
or SELECT COUNT(*) to check the progress.
| If you had simply recreated the table with a CREATE TABLE, you would not have caused Teradata to take the time to select some
number of rows and the time/work associated with that select and then throw the rows away instead of storing them into the table. | |
Did you ever explain a CREATE TABLE AS (SELECT) WITH NO DATA? It's *not* doing the select, the PE just extracts the necessary
information to create the table.
| It would seem that a SHOW TABLE to obtain the CREATE TABLE with changes incorporated into it would be much more
efficient. | |
As Gary used two tables this would mean doing two SHOW TABLEs and a lot of cut'n'paste. And it's quite complicated to do that in a batch
;-)
Dieter
| |