persistence

hi,how do i tell kdb+ to “persist” tables?i mean, when i create a table in oracle,i know that if i restart oracle, the tablewill still be there.i’ve scanned “q for mortals”…here: https://code.kx.com/trac/wiki/Cookbook/Loggingi see that -l will log and allow checkpointing,but what gets written? only tables? onlyupserts/deletes?ta, jack.

“kdb+ for mortals” is the one you want in this case

https://code.kx.com/trac/wiki/KdbplusForMortals/loading_tables_from_stored_data

-l will save the contents of the root/default locale, and will log all client changes so they can be re-applied on load or rollback 

for small tables just using set (perhaps in .z.exit ?) will probably be enough 

See set function:
https://code.kx.com/trac/wiki/Reference/set

You also may be interested in splaying tables:
https://code.kx.com/trac/wiki/Cookbook/SplayedTables

Kamil.

hi simon, thanks for your pointers.
when you say ‘client changes’, does
this include any changes initiated
by the server process?
(say, some timer inserts a row now and then)

To: personal-kdbplus@googlegroups.com
X-Mailer: Apple Mail (2.1082)

from https://code.kx.com/trac/wiki/Cookbook/Logging

> Updates done locally in the server process are logged to disk only if =
they are sent as messages to self. The syntax for this uses ‘0’ as the =
handle.
>
> q) // in server
> q)0 “insert[trade; (10:30:01.000; intel; 88.5; 1625)]”