Quote:
|
Originally Posted by sivram_k
Note:
------
The query goes for tablescan has the primary key in the where clause.But Statistics is not updated.Cardinality in system table is 0.but the actual number of records in the table is 0.1 million.
Is this what happening in my case?
|
That is probably what is happening. If you set the table to volatile, DB2 will ignore the statistics and encourage index usage.
The difference between the two systems could also be related to the value of LOCKTIMEOUT in the database configuraton setting.
You could be getting lock escalation from row to table level if the LOCKLIST memory is too small. For OLTP systems I would make the LOCKLIST 4096. The db2daig.log will show lock escalations if the message level is set to 3 (default).
If you upgraded your system from Version 7 to version 8, make sure that you reorg your table and indexes to convert them to type II. All indexes created in version are type II. Type II indexes are less likely to cause locking problems.
If you are using version 7, issue this command to reduce locking problems:
db2set RR_TO_RS=YES. This is not relevent to version 8.