1

Usually, truncating a table takes 5-10 seconds. But when several people work on the same DB instance (but different tables), the operation can take more than an hour. How do I debug this?

2 Answers 2

4

Locks on the table or on data dictionary resources used by the 'truncate table' command could cause this. The system could possibly be waiting around for a resource to be released before it can do the truncate.

Check whether the session is blocked waiting for a lock to be released.

Take a look at the queries described in orafaq.com/node/854 or dba-oracle.com/t_locked_rows_user_locks.htm to find out which locks might be blocking.

2
0

When using SAN storage, the filesystemio_options parameter setting should be reviewed. Setting the parameter to SETALL or ASYNCH alleviates log file sync waits during the truncate execution.

On a busy system, running additional DB writers is recommended as well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .