Based on your comments, and assuming you focus is on query performance (as opposed to INSERT performance), looks like you need a model similar to this:
Use ORGANIZATION INDEX
on MEASUREMENT
table (also consider using COMPRESS
clause, since there will be many rows sharing the same leading EXPERIMENT_ID
).
The index I1
consist from: {FEATURE_ID, EXPERIMENT_ID, MEASUREMENT_TYPE, VALUE}
, in that order. Consider using COMPRESS
clause, since there will be many rows sharing the same leading FEATURE_ID
).
This gives us 2 B-Trees:
- The B-Tree "underneath" the
PK
, i.e. the index-organized table itself. - The B-Tree "underneath" the index
I1
.
A query on EXPERIMENT_ID
can be satisfied by a single index range scan in the PK
B-Tree and no table heap access (heap doesn't exist). The PK
B-Tree naturally stores the rows belonging to the same experiment physically close together, so I/O is minimized.
A query on FEATURE_ID
can also be satisfied by a single range scan (in the I1
B-Tree). The I1
is a covering index, so there is no need to do a double-lookup into the PK
B-Tree. The I1
B-Tree naturally stores the rows belonging to the same feature physically close together, so I/O is minimized.
I'd shy away from horizontally partitioning the MEASUREMENT
table on MEASUREMENT_TYPE
, unless you have performed measurements on representative amounts of data and concluded it provides a performance tradeoff that better suits your needs.