This is a continuation of the earlier posts starting with this one: http://ravinote.blogspot.com/2020/09/best-practice-from-networking.html
Sequences can be stored efficiently with bitmap index when they are rather sparse. Bitmaps also help with conjunctive filters and this is useful in sequences with repeating members
The sequences can be more efficiently queried than standard query operators if the predicates are pushed down closer to the storage.
Sequences work well with bloom filters which test whether a member is part of the sequence or not. Sometimes it is enough to rule out that a member is not part of the set
If the range of sequences can be limited to a window, the user and application can take on much of the processing relieving the compute requirements from storage. Such intensive scripts can run anywhere the user wants if the data is available.
If logic pertains specifically to some data and applicable only to that data, it is possible to register logic and load a runtime to execute that logic specific to data just as it is possible to externalize query processing over an iterative data set.
There are several containers for logic usually packaged as modules and they can be invoked by a common runtime. However, at its simplest form, this logic is merely a set of rules.