Managing Records-Per-Block

Karan

New Member

All,
I found this article

"Best Practices for Managing Records-Per-Block Settings </B>
[FONT=verdana,arial]by Niel Powers "[/FONT]
[FONT=verdana,arial][/FONT]
[FONT=verdana,arial]Can any one pls. explain what 'Managing Records-Per-Block ' mean[/FONT]
[FONT=verdana,arial][/FONT]
[FONT=verdana,arial]just to get heads up before i start reading the article on it. [/FONT]
[FONT=verdana,arial][/FONT]
[FONT=verdana,arial]Thanks[/FONT]
[FONT=verdana,arial]K[/FONT]
[FONT=verdana,arial][/FONT]
 

joey.jeremiah

ProgressTalk Moderator
Staff member
I think that a great basis, especially if you don't have a dba background, is the engine crew monographs.

Although Gus has written them almost a decade ago, they're still relevant today, even with type 2 storage areas.


I'd recommend to anyone starting out first reading the monographs and ofcourse the docs, which you can download off psdn if you don't already have a copy.

I'm not sure learning from a presentation or whitepaper would be the best way to go here, even though Niel's presentation are usually great.


The engine crew monographs.

http://www.peg.com/techpapers/monographs/

For this purpose start with the space allocation monograph.

http://www.peg.com/techpapers/monographs/space/space.html


If you want a better understanding of what goes on under the hood, take a look at Dan Foremans publications. The pro's quote these books like it's the bible.

http://bravepoint.com/products/p_publications.html

You can also find some very interesting posts, more like publications, by Gus @peg.com.


But here's a preview -

Databases are made out of fixed size blocks, simply because data is read/written in blocks not a few bits or bytes at a time.

The block identifier ( within a storage area ) is called the dbkey, essentially the block number.


The main objects that fill a database are record and index blocks. Record blocks have a fixed number of record slots ( per storage area ) i.e. records per block ( rpb ).

The record slot number together with dbkey makeup the record id ( recid ). Recid is a 32 bit signed integer, essentially a 31 bit integer.

The bigger the rpb or the more bits the slot number occupies the smaller the dbkey and max number of blocks is and ultimately determines the max database size.

On the other hand a low rpb would leave the block mostly empty. Setting the rpb let's you control the granularity of records ( in a storage area ).

Use the average record size ( off proutil -C tabanalys ) to calc the rpb. You can also place tables in diff storage areas with diff rpb's.


Index blocks store keys in a compressed b-tree structure. There are tons of material on b-tree and index structures on the net. HTH
 
Top