- Teradata Cookbook
- Abhinav Khandelwal Rajsekhar Bhamidipati
- 207字
- 2025-04-04 17:23:32
There's more...
If you have taken all due considerations and followed all performance recommendations and are still facing issues with DELETE, you might want to use utility tools for delete. MLOAD is the best option for this; the main reason is that MLOAD is more efficient than regular SQL delete:
- Less I/O as no TJ is required
- Uses less disk space and I/O
- Prevents lengthy rollbacks of aborted jobs

However, there are a few considerations when you use delete in MLOAD:
- As MLOAD DELETE does a full table scan, an equality of a UPI value is not permitted, but on NUPI this is allowed. But an inequality of a UPI value is permitted.
- Delete does not have an acquisition phase.
- Only a single DELETE statement is used.
- Only one target table is used and not FIVE:
LOGTABLE mld_test_delete;.
LOGON cookbook_td/testuser2,*****;
.BEGIN DELETE MLOAD TABLES web_clicks;
DELETE FROM web_clicks WHERE site_id > 1508;
.END MLOAD;
.LOGOFF;
Delete statement is more I/O intensive than the CPU. Always take due considerations when aborting a long-running delete statement; as said earlier, it may result in harmful rollback.
Joined tables are not allowed in the from clause; they can't use the JOIN keyword. Use FROM table-list instead.