What is the difference between doing the following statements in Nesper
MarketDepth.std.unique(key).win:time_batch(500 msec)
vs MarketDepth.win:time_batch(500 msec).std:unique(key)
Does the first one batch all events with the unique key and dispatch every 500 msec? While the second batches all events and dispatches all unique keys every 500 msecs?
What about using the command output every 500 msec
instead of using the time_batch
? Any help would be greatly appreciated.
There is not difference. In longer words, the intersecion between last event unique by key and the last 500 msec of events is the same as the intersection between the last 500 msec of events and last event unique by key.
Taken alone, time_batch data window and output rate limiting accomplish similar things. Taken together with a specific select clause and other data windows, for example, they do not.