public class StorageSize extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
getStorageSize(BIN bin,
int idx)
Returns the estimated disk storage size for the record in the given BIN
slot.
|
public static int getStorageSize(BIN bin, int idx)
For KVS, a formula that customers will use to predict the storage for a given set of records, not including obsolete size (size available for reclamation by the cleaner), is as follows.
The storage overhead for a single Row (JE primary record) is:
Serialized size of the Row, all fields (JE key + data size)
+
Serialized size of the PrimaryKey fields (JE key size)
+
Fixed per-Row internal overhead (64: LN_OVERHEAD + PRI_SLOT_OVERHEAD)
The storage overhead for an Index record is:
Serialized size of the IndexKey fields (JE key size)
+
Serialized size of the PrimaryKey fields (JE data size)
+
Fixed per-IndexKey internal overhead (12: SEC_SLOT_OVERHEAD)
This method returns the size estimate for an actual record based on the
use of that formula, getting the key and data size (or lastLoggedSize)
from the BIN. The amount calculated using the formula above will
normally be larger than the size returned by this method, for several
reasons:
Copyright © 2024. All rights reserved.