3 ms·
Older than 2020 but another indispensable feature SQLite added was window functions in 2018.
by kccqzy 4y ago
Older than 2020 but another indispensable feature SQLite added was window functions in 2018.
- btilly 4y agoThis is my favorite feature.
- mongol 4y agoIt is interesting to read about it proposed in 2014 https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg85628.html https://www.mail-archive.com/sqlite-users@mailinglists.sqlit... Hipp: > You used the word "immense" which I like - it is an apt description of the knowledge and effort needed to add windowing functions to SQLite (and probably any other database engine for that matter).
- swyx 4y agowhy 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.