user9525111
user9525111

Reputation:

Difference between segmentation and partition in KDB

What is the difference between HDB segmentation and HDB partition? As per my understanding both stores the data in different partitions (based on date, month, year etc)

Upvotes: 3

Views: 1804

Answers (1)

nyi
nyi

Reputation: 3229

In Segmented table none of the partitions are under the same root; instead the root contains a file called par.txt having paths to different segments. while in partitioned table, all the partitions are under the same root.

check out this link : https://code.kx.com/wiki/JB:KdbplusForMortals/kdbplus_database

Use .Q.par to find the exact path(segment) of the a segmented table.

The main advantage the segmented DB provides is the speed while doing the map reduce operations.

Typical structure of partitioned db :

/db
    [sym]
    /partition1
    /partition2

Typical structure of segmented db :

/db
    [sym]
    par.txt
    "
==drive1====
/segment1
    /partition1
    /partition2
    "
==drive2====
/segment2
    /partition1
    /partition2
    "

Upvotes: 1

Related Questions