Step 7: Calculate the size of the leaf index row

Index rows containing variable-length columns require more overhead than index rows containing only fixed-length values.

Fixed-length keys only

Use this formula if the index contains only fixed-length keys and are defined as NOT NULL:

Formula

  7

(Overhead)

+

Sum of fixed-length keys

= Size of leaf index row

Some variable-length keys

Use this formula if the index contains any variable-length keys or columns defined as NULL:

Formula

Example

   9

(Overhead)

      9

+

Sum of length of fixed-length keys

+

      4

+

Sum of length of variable-length keys

+

    20

+

Number of variable-length keys + 1

+

      2

= Subtotal

    35

+

(Subtotal / 256) + 1 (overhead)

+

      1

= Size of leaf index row

    36