Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Holders tab freezes #32

Open
vikiival opened this issue Jul 7, 2023 · 3 comments
Open

Holders tab freezes #32

vikiival opened this issue Jul 7, 2023 · 3 comments
Labels
$ p2 resolver Server extension

Comments

@vikiival
Copy link
Member

vikiival commented Jul 7, 2023

On a huge collection

app freezes when you click on holders

Screenshot 2023-07-07 at 14 53 38
@vikiival
Copy link
Member Author

a bit of tinkering over Ku*

select
       ne.current_owner,
       count(ne.current_owner),
       SUM(e.meta::bigint / 1e12) FILTER (WHERE e.caller = ne.current_owner) AS bought,
       SUM(e.meta::bigint / 1e12) FILTER (WHERE e.current_owner = ne.current_owner) AS sold,
       max(e.timestamp)::date as updated
from nft_entity ne
left join event e on ne.id = e.nft_id and e.interaction = 'BUY'
where collection_id = '7e982817a2d2575031-C6N4I' group by ne.current_owner order by count(*) desc;

@vikiival
Copy link
Member Author

If it fixes freezing let's go

@daiagi
Copy link

daiagi commented Jul 10, 2023

If it fixes freezing let's go

Also need to address flippers.
When we have both can stop querying the entire collection event history => fix freezing

I'll have pr for that very soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
$ p2 resolver Server extension
Projects
None yet
Development

No branches or pull requests

2 participants