|
|
|
|
|
by zombieprocesses
3008 days ago
|
|
Is this an advertisement? Because it reads like one. Postgresql and most mature database systems already have topN/offset/paging solutions. Also, what's the point of aggregating JSONB data? If you need to calculate topN, why not normalize the data properly and index the data? Then top N will be blazing fast without needing an extension? If the data set is extremely large then you can maintain an internal "Top N" table that gets calculated when data is added/removed. It all depends on the workload, but inserts/updates/deletions may be slightly slower, but reads of topN will be constant speed. |
|