cancel
Showing results for 
Search instead for 
Did you mean: 

Adding partitions w/o reloading the database

LamHinYan
New Contributor
After splaying tables into a partition dir, I would normally call system "l dbDir" to reload a partitioned/segmented database. Can I add partitions w/o reloading the database? kdb keeps a mapping between the partition domain to the partition dir paths. Can I manipulate the stuff below without reloading the database? Thx.

http://code.kx.com/wiki/DotQ#Partitioned_Database_State

2 REPLIES 2

charlie
New Contributor II
New Contributor II
yes, you can add new partitions and then load them when they are ready. However, don't manipulate existing partitions that kdb+ has already been made aware of, as that is unsafe.

Can I add a partition w/o re-scanning the partitioned/segmented table?
Let's say I have already got 10 years' data partitioned by date
/db/2000.01.01/quote ... /db/2010.12.31/quote
I am adding 2011.01.01. Reloading the database would cause kdb to rescan 3650+ partitions. 

Q1. Can I add the new dictionary entry 2011.01.01 -> /db/2011.01.01 w/o re-scanning? 
Q2. Are the stuff below writable? If yes, what should I add? 
http://code.kx.com/wiki/DotQ#Partitioned_Database_State
http://code.kx.com/wiki/DotQ#Segmented_Database_State
.Q.PV,:2011.01.01
.Q.pd,:`$"/db/2011.01.01";
.Q.PD,:`$"/db/2011.01.01";
.Q.P,:`$"/db/2011.01.01";

Q3. What if I am adding segments?
Q4. Can I remove existing partitions w/o reloading?

thx