I am recording snapshots of variable market depth in a table usingkdb+/tick. I send each snapshot to tick.q using a separate .u.upd call,e.g., a snapshot of 5 bids and 5 offers might be followed by a snapshotof 8 bids and 6 offers.Can I rely on the time that tick.q stamps as a unique grouping variableto reconstruct the snapshots? Or could two .u.upd calls end up with thesame timestamp?Thanks,Josh
It’s unlikely consecutive snapshots would have the same nano precision time; by the time a single snapshot has been stamped and inserted into the temporary table the nano time will certainly have changed. Assuming the system is able to provide nano precision time that is.
My data volume is in the order of 100k rows per sec. The kdb quote table is only indexed on the time and symbol columns.
Will the quote of a symbol change twice in 1 microsec? I am given microsec timestamps. xasc sorting is stable. Make sure that you preserve the order in other operations. microsec timestamp + symbol may not be a primary key.
How many IPC calls can kdb do per sec? ~20k on localhost. Does this mandate batching?
How many times can you read the system clock per sec? System clocks rarely have nanosec precision anyway. 1M calls to .z.P consumed 241 millisec already.
q)\ts:1000000 .z.P
241 256