Reputation: 11
We have to do some analysis on some tables for that we have to find out the maximum possible row size of each table in db2 db.
Please let us know..
Upvotes: 0
Views: 1274
Reputation: 1
Look at the system catalog. There is a column avgrowsize in syscat.tables. This is an average, effected by the lengths of the various VARCHAR columns, but this is a good starting point for your calculations.
Upvotes: 0
Reputation: 17118
Check out the Db2 documentation for CREATE TABLE. It contains the lengthy formula to compute the row size for a table. It depends on many attributes like
The maximum possible row size depends on the page size, but there is also a column count limit.
If you don't need it precisely, you can sum up the byte count for each column data type in your table, add some extrac bytes. Then, make sure it is below 1/4 of the page size.
Upvotes: 1