Skip to content

Conversation

@iuwqyir
Copy link
Contributor

@iuwqyir iuwqyir commented Feb 27, 2025

TL;DR

Optimized transaction search performance by implementing time-based search strategies.

What changed?

  • Added time-based filtering for function signature searches, prioritizing transactions from the last 30 days
  • Split transaction hash searches into three parallel time ranges (0-5 days, 5-30 days, and 30+ days ago)
  • Enhanced address-based transaction searches with time-based optimizations
  • Introduced new helper function searchTransactionsByTimeRange to handle time-based transaction queries

How to test?

  1. Search for a transaction hash and verify results are returned quickly
  2. Test function signature searches and confirm recent transactions (< 30 days) appear first
  3. Search for an address and verify transactions are properly filtered by time ranges
  4. Verify older transactions are still accessible when recent ones aren't found

Why make this change?

To improve search performance by prioritizing recent transactions and implementing parallel search strategies. This approach reduces query load on the database and provides faster results for common use cases where users are typically looking for recent transactions.

Copy link
Contributor Author

iuwqyir commented Feb 27, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@iuwqyir iuwqyir requested a review from a team February 27, 2025 10:35
@iuwqyir iuwqyir marked this pull request as ready for review February 27, 2025 10:35
@iuwqyir iuwqyir merged commit 6dd120e into main Feb 27, 2025
5 checks passed
@iuwqyir iuwqyir deleted the 02-27-try_to_search_optimistically_from_newer_data branch February 27, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants