2 ms·
why is windowing hard? isnt it kind of a rolling filter?
by swyx 4y ago
why is windowing hard? isnt it kind of a rolling filter?
- thesz 4y agoExactly because it is so. You have to compute as little as possible and make it O(1) for a row added and deleted, not O(window_size).
- tehbeard 4y agoIt allows for recursion in the query (fetching a tree of a category structure for instance where it's just a id,parent_id,priority tuple) Handling that efficiently without conditioning the data first using something like nested set or materialized paths is going to be a challenge when the depth is unknown.