indexer icon indicating copy to clipboard operation
indexer copied to clipboard

Make account lookup with auth-addr filter instant.

Open urtho opened this issue 1 year ago • 2 comments

Problem

Queries for accounts with auth-addr are slow[^1].

Solution

  • Add optional partial index that speeds up the query for accounts with auth-addr
  • Modify the auth-addr filer query to make sure it includes the partial index for Postgres & CockroachDB (if enabled)

[^1]: This is a placeholder issue - Nodely is going to do PR for that soon, following tests on light-indexer and fnet

urtho avatar Sep 09 '24 13:09 urtho

Here is an algorand code chat service, taking a first-pass at the issue.

video of issue chat

Could this be useful for the community?

We compress the retrieval results, allowing it to feel like it was actual trained on the codebase specifically (even better as it can find the exact files like a needle in a haystack). Tightly integrated into git.

I have an interest in seeing the Algorand ecosystem succeed, as my company built an open source governance platform on Algorand (currently running in as a local test chain until we're comfortable for pub launch).

7db9a avatar Oct 14 '24 21:10 7db9a

Wow, impressive. Incorrect but still impressive.

  • auth field is actually named spend in the DB.
  • Postgres might not consider the partial index unless the exact filter expression is also present in the queries.

urtho avatar Oct 15 '24 08:10 urtho