Using Table Spaces with UNION ALL

A UNION ALL in a view can be used to circumvent some restrictions in DB2 and allow for more flexible maintenance in time-series data.

Tables in DB2 can only occupy 64 GB of storage if a 4 K data page is specified. Increasing the page size to 8 K, 16 K, or 32 K can result in larger table sizes, but the restriction of 255 rows per page could still limit the amount of data that you can store.

A user could overcome this space limitation by breaking a table into smaller units and placing each of these units into a separate table space. Consider the quarterly sales data tables found earlier, where each table was placed into the default table space. This design limited all tables to a limit of 64 GB of data. Instead ...

Get DB2® Version 8: The Official Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.