15.00 - Cylinder Index - Teradata Database

Teradata Database Design

prodname
Teradata Database
vrm_release
15.00
category
User Guide
featnum
B035-1094-015K

Cylinder Index

The cylinder index is a disk-resident file system file structure that contains substructures referred to as Subtable Reference Descriptors (SRDs) and Data Block Descriptors (DBDs). The structure of SRDs and DBDs is the same for any system configurations. Each disk cylinder has its own cylinder index. The cylinder index contains pointers to all the data blocks and free sectors on the cylinder it represents.

If AMP memory is large enough, the cylinder index usually remains cached. This normally means that the only I/O required for a primary index lookup is for the data block that contains the row.

Each cylinder index entry contains the following data sorted on table ID and rowhash.

  • Table ID for the table stored in the block (rows from different subtables are never mixed in the same data block)
  • Lowest rowID value in the block
  • Highest partition/rowhash value in the block
  • The partition is 0 for NPPI tables and nonpartitioned NoPI tables.

  • Sector number for that block
  • Number of sectors in the block
  • The file system uses the table ID and rowID value for the row being retrieved to scan the cylinder index for the beginning sector number and sector count where the desired block is stored.

    Following through with the query from “Master Index” on page 246, consider the following set of fictional cylinder index entries for cylinder 169. Note that the + n values for the rowIDs indicate the uniqueness value.

     

    Table ID

    Starting RowID

    Highest Partition and Rowhash Value

    Beginning Sector Number

    Sector Count

    100

    0 + 00058 + 0001

    0 + 00163

    1010

    9

    100

    0 + 00184 + 0001

    0 + 00329

    0789

    6

    100

    0 + 00363 + 0001

    0 + 00994

    0530

    4

    100

    0 + 01035 + 0001

    0 + 01114

    0056

    5

    100

    0 + 01185 + 0002

    0 + 01190

    1138

    8

    100

    0 + 01221 + 0001

    0 + 02072

    0117

    16

    100

    0 + 02123 + 0001

    0 + 02365

    0888

    7

    The process for finding the required data block is as follows.

    1 The file system performs a binary search on the cylinder index using the table ID and rowID as the search key.

    2 This locates the data block that begins with sector 0789 with a sector count of 6.