hashgraph / hedera-mirror-node

Hedera Mirror Node archives data from consensus nodes and serves it via an API
Apache License 2.0
124 stars 108 forks source link

Research ways to optimize transaction filters #7860

Closed steven-sheehy closed 5 months ago

steven-sheehy commented 6 months ago

Problem

The transactions list endpoint can timeout when using multiple request parameters like account.id, type, and transactiontype.

Solution

Explore using pg_roaringbitmap extension

Alternatives

No response

xin-hedera commented 5 months ago

Overall we can consider pg_roaringbitmap as a viable and scalable solution for transaction filtering with all our use cases. The extension shows very good read performance and provides all the bitwise /bitrange operations we need to retrieve information. There are some downsides though, some have already been addressed, some need engineering effort.