This function deletes and drops all records in the specified table significantly faster than in other ways, because it doesn't work with indexes. Deleted and dropped records cannot be restored later.
This function won't be executed, if an editable cursor from this table is opened or if another user placed locks on this table. The following Signalize function will display the error "Object is in use" in both cases. Locks placed by the user who is calling this function don't block this function.
The value counter in the column with the UNIQUE implicit value will be set to zero after this function is executed.
This function cannot be used on system tables. You must have the global privilege to delete all records in the table.
This function doesn't call the DELETE triggers. Referential integrity validity is not checked neither - therefore this function may cause data inconsistency if used improperly! Default commit is called before and after this function is executed - cannot be rolled back!
Example in SQL:
CALL Truncate_table("MY_TABLE")
A comparison on deleting speed: let's have a table with 60000 records and 4 indexes, without DELETE triggers and referential integrities. The deleting of this table contents using the DELETE and CALL Free_deleted takes 18 seconds, while CALL Truncate_table takes less than 1 second. If the table contained DELETE triggers and cascade deleting in RI, the ratio would be even higher.