Skip to content

Optimize gsfa: store transactions per account relation for most recent 1000 transactions #37

@grooviegermanikus

Description

@grooviegermanikus

Add redundant table (next to accounts_map_transaction) which stores the most recent 1000 transactions per account.

Algorithm:

  1. take the transaction ids from current accounts_map_transaction_latest
  2. use the accounts and transactions from current block
  3. merge the two transaction id arrays (per acc_id):
    array_dedup_append('{8,3,2,1}', '{5,3}', 4) -> {2,1,5,3}
  4. update/insert into accounts_map_transaction_latest table
SELECT
	array_dedup_append('{8,3,2,1}', '{5,3}', 4),-- {2,1,5,3}
	array_dedup_append('{8,3,2,1}', '{5,3}', 10000) -- {8,2,1,5,3}

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions