[POC] Performance test: anti-join (200k ignored owners against 80M Amulets)#5775
[POC] Performance test: anti-join (200k ignored owners against 80M Amulets)#5775julientinguely-da wants to merge 6 commits into
Conversation
Signed-off-by: Julien Tinguely <julien.tinguely@digitalasset.com>
|
Idea to try out bloom filters if it scales badly: https://www.postgresql.org/docs/current/bloom.html |
…/poc/anti-join-amulet-ignore
…/poc/anti-join-amulet-ignore
…/poc/anti-join-amulet-ignore
…to julien/poc/anti-join-amulet-ignore
Signed-off-by: Julien Tinguely <julien.tinguely@digitalasset.com>
moritzkiefer-da
left a comment
There was a problem hiding this comment.
thx looks good to me
| 'sv', 'sv_' || lpad((row_num % 50)::text, 3, '0') || '::1220' || md5('sv_' || (row_num % 50)::text), | ||
| 'round', (row_num * 11 + 3) % 3000, | ||
| 'weight', 1 + (row_num % 20), | ||
| 'beneficiary', 'user_' || lpad((row_num % 10000)::text, 5, '0') || '__wallet__user::1220' || md5('owner_' || (row_num % 10000)::text) |
There was a problem hiding this comment.
why do we only do 10000 here? 10k parties seems not very much. Are you assuming that the number of reward recipients is much smaller than the number of coin holders? Maybe not that unreasonable but at least for app rewards 10k seems very low.
There was a problem hiding this comment.
Are you assuming that the number of reward recipients is much smaller than the number of coin holders?
yep
Maybe not that unreasonable but at least for app rewards 10k seems very low.
Only tested against Amulet here, but yes makes sense
|
|
||
| -- 4. create index and redo anti-join in point 4. | ||
|
|
||
| CREATE INDEX idx_dso_acs_pn_tid_croe_owner |
There was a problem hiding this comment.
Do you expect that we keep the index on the JSON field? Usually our indices work by creating a separate column and indexing on that.
There was a problem hiding this comment.
The query plan uses idx_dso_acs_pn_tid_croe instead of this one, cheaper apparently.
POC
Before starting with the implementation of #5019, we wanted to verify that the proposed query scales efficiently with about 90M rows. Specifically, we isolated and tested the anti-join behavior between
amulet_owners_to_ignoreanddso_acs_store,as outlined inpoc_parties_amulet_anti_join.sql.Tested query
Results
The experiment confirms that this query is highly scalable:
dso_acs_store_sid_pn_tid_croeandidx_test_owners_party_id) with 0 heap fetches.Raw outcomes
Pull Request Checklist
Cluster Testing
/cluster_teston this PR to request it, and ping someone with access to the DA-internal system to approve it./hdm_teston this PR to request it, and ping someone with access to the DA-internal system to approve it./lsu_teston this PR to request it, and ping someone with access to the DA-internal system to approve it.PR Guidelines
Fixes #n, and mention issues worked on using#nMerge Guidelines