You are viewing a single comment's thread:

RE: There Has to Be a Better Way: Sorting Hive-Engine Balances

(edited)

I ran into this same problem with Hive Engine Tools and now Hive Analytics.
The easy solution is fetch by ID then use last id rather than offset pagination.

Right now Hive Analytics just uses offset, but when I refactor it, it will pull entire list then use server side sorting from cache.

-0.21851454 BEE
2 comments

Thanks for mentioning this method. It sped up the smaller tokens tremendously and moderately improved the mid-sized queries, the large token counts still take a long time, but it is substantially better.

0.00336711 BEE

Thanks, I'll probably implement that until if/when that pr goes through.

0.00000000 BEE

Right now Hive Analytics just does offset and gets the top 500 by balance, but if you sort by staked, it will only sort among those 500 user which are not the top 500 staked. This will be resolved later as the main point was for balance rich list.

-0.22523262 BEE