Cyclinder index vs Master Index


Cyclinder index vs Master Index

Hi !

I am new to tera data, can you someone please explain the difference between Cylinder and Master Index.

Thanks in Advance

Safwan Dar

Re: Cyclinder index vs Master Index

The master index and cylinder index together is used for lookup of records.

Master index (memory resident) has an entry for each cylinder (Called cylinder index descriptor) which tells it what is the range of table id,partition #, row id combination available in that cylinder (these values does not overlap with that of another cylinder).

So looking at a Master Index you will get an Idea of which cylinder to look for a row, given it's PI values, and partition (if applicable). (Table id is always available).

Each cylinder has it's own cylinder index (most of the times cached in memory).
The cylinder index contains a subtable reference descriptor (SRD) for each subtable that has records in that cylinder. (A subtable could be a data subtable, index subtable, RI subtable etc).

An SRD would have entry (called data block descriptor DBD) for each data block allocated for that subtable, and has the location of the data block as well as the range of partition #,row ids allocated on that block.

The cylinder index also contains Free Segment Entry records to identify the free sectors in the cylinder.

While the cylinder index has a physical existence in the cylinder as part of the file system (and is often cached), the master index is always memory resident so is rebuilt by the AMP whenever it start up.

There's one master index per AMP and as many cylinder indexes as there are Cylinders (per AMP).

Re: Cyclinder index vs Master Index

Thank you, it was really helpful.