After reading many of articles from the internet, I am still not sure what is the actual purpose of DB2 Runstats
.
As my understanding, DB2 Runstats
will "register" the table index to the DB2 catalog, so that next time when the related query run, it will use the index to increase the performance. (Please correct me if I am wrong)
Meaning, if for a long period of time the DB2 Runstats
is not run, the index will be removed from the DB2 catalog?
I am creating a new index for a table. Originally that table already contained another index.
After creating the new index, I ran DB2 Runstats
on the table for the old index, but I hit the following error:
SQL2314W
Some statistics are in an inconsistent state. The newly collected "INDEX" statistics are inconsistent with the existing "TABLE" statistics.SQLSTATE=01650
At first I was thinking it's cause by the activity to create the new index, and the table was still in the "processing" stage. I ran the DB2 Runstats
command again the next day but still got the same error.