Implementing Siebel Business Applications on DB2 for z/OS > Customizing a Development Environment > How Siebel Tables with LONG Columns Are Stored >

Determining the Table Space Size for Tables with LONG Columns


To avoid LONG columns becoming unnecessarily large, define tables containing LONG columns in table spaces and buffer pools that are an appropriate size. This involves considering factors such as the type of data that the LONG column stores, and the maximum amount of data that the column is likely to contain. The following procedure describes how to estimate the appropriate table space size for a table with a LONG column.

To estimate the appropriate table space size for a table with a LONG column

  1. Enter the following query to determine your current minimum length requirements for an existing LONG column:

    SELECT MAX(LENGTH(column_name))
    FROM tableowner.tablename

    where:

    • column_name is the name of the LONG column
    • tableowner.tablename is the name of the table owner and the table containing the LONG column
  2. Using the value returned by the query as a guideline, adjust the column length to take into account future needs.
  3. On the basis of your calculations in Step 1 and Step 2, use the guidelines in the following table to determine the size of the table space appropriate for the table containing the LONG column.

    NOTE:  The values shown are general guidelines only; the actual table space size required for a specific table might vary depending on table-specific variables.

    Length of Data in LONG Column
    Table Space Size

    Less than 3404 bytes

    4 KB

    Less than 7486 bytes

    8 KB

    Less than 15,678 bytes

    16 KB

    15,678 to 16,350 bytes

     

    32 KB

    However, if SELECT queries are failing because of the in-memory sort limit of DB2 for z/OS, convert the LONG column to a CLOB.

  4. Move the table to a smaller or larger table space and buffer pool as required.

    For information on this task, see Moving Tables Between Table Spaces.

Implementing Siebel Business Applications on DB2 for z/OS Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.