- 
                Notifications
    You must be signed in to change notification settings 
- Fork 168
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
ma_tx_out is by far the most populated table (~165M entries on epoch 319). It also references the multi_asset table.
We can improve performance here. Two ideas:
- We query the multiasset and only if it doesn't exist we insert it. Querying only requires- policyIdand- name, which compose the unique key. Most probably the query will always succeed, since minting comes first.
- We can cache a mapping of (policyId, name) -> MultiAssetId. There are 3.2M entries ofmulti_asseton epoch 319, so this seems like a good bargain: 3.2M entries in memory to avoid 165M queries.
Also multi_asset doesn't have any OnDeleteCascade fields, so on a rollback the db is left with unnecessary fields.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request