Troels Arvin wrote:
On Tue, 24 Apr 2007 16:24:32 +0200, Knut Stolze wrote:
>>Some users are frustrated by DB2 locking their database operations
(most recently: a table drop took forever, probably because of a lock).
I'd say it is most probably because DROPPED TABLE recovery is turned on
for the tablespace in which the table resides. Then DB2 has to store
the table's data, which may take a while to copy it.
Why does DB2 have to copy the dropped table? - I would think that the
transaction logs (in combination with the latest backup) should have all
the data needed for re-construction of a dropped table?
I would think so, too. But I found in the past that DROPPED TABLE recovery
has the mentioned performance impact on a DROP TABLE statement. The manual
says this:
-------------------snip-----------------
When a DROP TABLE statement is run against a table whose table space is
enabled for dropped table recovery, an additional entry (identifying the
dropped table) is made in the log files. An entry is also made in the
recovery history file, containing information that can be used to recreate
the table.
-------------------snip-----------------
But writing a log records and something to the history file has no
measurable impact. So there must be something else going on under the
hood. What exactly, I do not know (yet).
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany