On 28 Cze, 19:16, span4d <spa... (AT) yahoo (DOT) com> wrote:
Quote:
I am noticing lot of data page reads during an insert ( ~ 50 - 100
records) to a mdc table ocationally, sometimes as high as 100k. There
are no page overflows and table is in a healthy state. Why does db2
need to scan data pages during insert? |
It's difficult to say because you do not provide any further
informations.
If table has indexes an INSERT operation requires extra work when
indexes are involved.
First reason : index page can be full and DB2 is forced to split
index page.
The other reason : a new row is to be inserted into a table, and the
clustering index indicates that the row should
be placed in page let's say 100 so as to maintain the table's
clustering sequence. If page 100 is X-locked by some other
data-changing process that has not yet reached a commit point, DB2
will not wait for that X-lock to be released.
Instead, it will attempt to place the new row in a page that is close
to page 100 and it is additional page reads.
The same is true if page 100 is full and can't hold the new row (index
page splits can occur in a DB2 database, but there's no such thing as
a DB2 data page split).
PW