|
|
Archives of the TeradataForum
Message Posted: Wed, 20 Oct 2004 @ 09:36:59 GMT
Subj: | | Re: Can this query be written more efficient |
|
From: | | Victor Sokovin |
| The two tables have the same structures and same PIs. Only columns X and Y are the same, so the union does not work, as it duplicates all
the mtable rows. I need any rows in table that also has a row in mtable with the same X and Y to be excluded from table and be inserted from
mtable into table_copy. | |
Further to what has already been suggested, I'd probably also try the MINUS (ALL) operator.
If nothing helps, the next thing to look at is the target table itself. Important points: size, SET or MULTISET, additional dependent
structures on it such as SI or JI.
If it applies to your case, try to drop all the indexes one by one to see which one slows down the loading process most. If the table is SET,
make a MILTISET copy and repeat the load into it to see how much difference that makes.
That's probably all the obvious options assuming you just run your statements in, say, BTEQ, and not via some ODBC gateway or something.
Regards,
Victor
| |