DB2 - Problem description
Problem IT36396 | Status: Closed |
SQL0901N APPERR WHEN INSERT INTO AFTER TRUNCATE WITHOUT IMMEDIATE CLAUSE | |
product: | |
DB2 FOR LUW / DB2FORLUW / B50 - DB2 | |
Problem description: | |
If the inserts are inserting less than 10K rows of data per insert range then we will not create any synopsis tuple. By doing so we essentially reduce the storage consumption of synopsis table by not allocating any extents. And since the table is deemed as small table there is no significant query performance benefit from TSN filtering that synopsis tables provide. Once the 10K threshold is reached for any given insert range, we will write the first synopsis tuple and then set the synopsis tuple threshold back to 1024 and everything works as usual. So if you query the synopsis table the very first tuple for all the insert ranges will cover a larger TSN range compared to rest of the tuples (there is one exception though which you can see in the slides). Hitting following assert in TableWriter::setupSynopsisTableWriter: // For this assertion and any assertion following that checks if our // TSNs covered are greater than our synopsis tuple limit, we will also // check if the operation is a LOAD operation. A LOAD operation that is // performed after many rows have been inserted but before the first // synopsis tuple was written may show the amount of TSNs not covered is larger // than the default limit. In this scenario, the first tuplet loaded will // see that the limit is exceeded and write out the initial synopsis // tuple, after which the normal limit will be applied. CDE_ASSERT_ALWAYS_ERROR_WITH_CONTEXT(COMPONENT_DATA, getCurrentMaxTSNsPerSynopsisTuple() > numTSNsNotCoveredBySynopsis || mTableWriterType == LoadTableWriter, "numTSNsNotCoveredBySynopsis is too large: " 10 minutes at least) 6. insert again | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * all * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to 11.5.6 or later * **************************************************************** | |
Local Fix: | |
Use "TRUNCATE IMMEDIATE;" instead of "TRUNCATE ;" | |
Solution | |
Workaround | |
**************************************************************** * USERS AFFECTED: * * all * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to 11.5.6 or later * **************************************************************** | |
Comment | |
Upgrade to 11.5.6 or later | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 29.03.2021 21.06.2021 26.06.2021 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |