DROP Processes for DROP TABLE
When you drop a table, the system frees the disk space used by the dropped table (including any secondary index subtables) and any fallback copy, removes any explicit access privileges on the object, and removes the metadata for the dropped object from the data dictionary.
Locks for DROP TABLE
- The DROP places an all-AMP EXCLUSIVE lock on the object itself as identified by its TVMId value, for example, TableId.
- Among other dictionary locks, the DROP places an all-AMP WRITE lock on the partitioned DBC.AccessRights table on the single partition corresponding to the table unique DatabaseId and TVMId. This partition contains the complete list of privileges on the object to be deleted by the DROP operation.
DROP TABLE and Queue Tables
If a transaction is delayed while waiting to perform a SELECT AND CONSUME operation on the specified queue table, the system cancels that transaction immediately after dropping the table.
DROP TABLE and Error Tables
You cannot drop an error table using the DROP TABLE statement. You must use DROP ERROR TABLE.
To drop a data table has an error table associated with it, you must first drop its error table.
You must drop the error table in a separate DROP ERROR TABLE request.
The system adds a row to the DBC.ErrorTbls system table only when you create an error table, so you need not delete any rows from DBC.ErrorTbls when you drop its associated data table.
The DBC.ErrorTblsV or DBC.ErrorTblsVX views displays Dropped Database, Dropped Table, or Dropped User, respectively, in place of the dropped database, data table, or error table creator name. See ErrorTblsV[X] .
DROP TABLE and Statistics
When you drop a table definition, Vantage also drops all the statistics that have been collected on the table.
If you create a new table with the same name, recollecting statistics on the views and queries revalidates the statistics, which then become usable again.