v1CoinInsights#279
Conversation
…nces table, add tests
| -- Name: associated_wallets associated_wallets_blocknumber_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - | ||
| -- | ||
|
|
||
| ALTER TABLE ONLY public.associated_wallets |
There was a problem hiding this comment.
a lot of these are an oops from my local - once this is merged I'll refresh 01_schema.sql from prod
| END IF; | ||
|
|
||
| -- For DELETE, always run | ||
| IF TG_OP = 'DELETE' THEN |
There was a problem hiding this comment.
is DELETE to handle the case where we want to wipe the db?
There was a problem hiding this comment.
yeah or if we decide to move to just deleting rows instead of maintaining an is_delete column or something. just good for coverage imo.
| NOW(), | ||
| NOW() | ||
| FROM ( | ||
| SELECT |
There was a problem hiding this comment.
I feel like this query reads better as
select user_id, balance
from users
left join associated_wallets
left join sol_claimable_accounts
rather than the union, but non blocking. just expressing my feels
There was a problem hiding this comment.
yeah but then you gotta coalesce two balance columns together and you end up inserting for every user rather than just those with wallets/accounts... i think it's fine...
sol_user_balancesthat tracks user balances by mint. This had the effect of bringing the members related queries back down to < 3 seconds ( < 1s when primed) on my local db which is ~clone of prodmembersandmembers24hrChangePercentand the Birdeye token overview into a separate route,v1/coins/:mint/insights, as information from these is really likely to only be used for specific purposes, where asv1/coinswill be used all the time to list coins.logoURIis one? I know you want to have the description in here as well.