How it works...

Like all tables, spool tables also have table IDs. There are a range of table IDs exclusively reserved for spool tables (C000 0001 through FFFF FFFF) and the system cycles through them. If a table is incorrectly dropped, it remains in existence. Eventually, the system will cycle through all the table IDs and reassign the table IDs which are in use by the leftover spool table.

A user, having been left with leftover spool issues, can face frequent spool failure even if a query is efficient and using limited spool. This needs to be checked with the DBA; update the spool if required.

Get Teradata Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.