I'm in the process of migrating a set of databases from code set ISO8859-1 to UTF-8, STRING_UNITS=CODEUNITS32. I suspect that quite a few indexes will no longer fit in there current tablespace page size (SQL0614N). Is there a formula that can be used to determine the minimum page size for each index?
I've found the following article by Serge Reilau:
https://www.ibm.com/developerworks/community/blogs/SQLTips4DB2LUW/entry/getrowsize?lang=en
that I guess I can modify to determine the size of the index, but I'm not entirely sure whether the same formula holds for indexes.
Any pointers?
Best Answer
Not sure whether this is actually correct, but I'll use it as an estimate until I figure out something better:
The DB:s in question don't use compression, and I also skipped types that can not be part of an index.
alt:
EDIT: Example of XML column in index
A table like:
Generates two indexes (not sure why though) where type name of the column is XML:
In addition, explicit xml indexes also result in indexes in the catalog whose column type is XML.
Since the source database is not UTF-8, there can't be any JSON columns. For a UTF-8 database, it may be worthwhile to investigate whether indexes for JSON comes into play. The function GetInxSize is however specially designed to handle non-utf -> utf, so it will have to be changed for utf-8 databases.