RE: How SPS Stakeholders and Staking HP and HBD?
You are viewing a single comment's thread:
This query seems better but still takes too long for "spammy" accounts. It's fine though.
Those tables are not created by me. They are from haf balance tracker. Those tables store each balance separated by their symbol aka nai. So for HIVE balance you have one row and another row for HBD balance. It would be storing VESTS so your can use vests_to_hive function.
Anyway, I plan on dropping balances from hafsql and depending on balance tracker. I can probably recreate the same view you are using so shouldn't be any big breaking changes. I should probably create more views and take advantage of other HAF apps/tables including the two mentioned tables.
0
0
0.000
Nice info we are getting closer... if this better I could start using this part of the tables.
Only now i'm missing the delegated do you know why that is not part of the VESTS balance?
There is no historical tracking of delegations. There are only current values available.
Oke clear. you cannot have everything 😁 some limitation over performance that is the question.
@azricon, how important do think it is to include the delegations?
I can take a look later to see if I can come up with a query that tracks historical delegations and make that a materialized view which can refresh once an hour or so depending on the query.
Do not what to spam you 😂. But i found a another method to limit the call that i will commit for now
This does the first last record and every first of the month, exactly what is want
limited the number of account at once to 5
Thanks again for the help 🙏
You are not spamming. This one takes too long for top witnesses.
BTW: what i also can do easily is limit the request one account at the time
There is a limit on how many concurrent connections you can have per IP. Currently it is set to 6. So it's not a problem on the database side but your will get errors so you should probably setup a pool on the client side and run queries on the pool.
oke thanks again just updated my pool to 6. it was on default 10