Skip to content

#408 Batch symbol lookup in RRF fusion #410

Closed

Description

@ajianaz

Problem

After RRF fusion, each result calls get_symbol_by_id(conn, id) individually -- N+1 query pattern. 20 results = 20 SQL queries.

Location

src/index/brain.rs:132-147

Solution

Replace N individual SELECT ... WHERE id = ?1 with a single SELECT ... WHERE id IN (?, ?, ...).

Expected Impact

Eliminate 20+ queries per search.

Activity

  1. added
    performance
    phase-1
    on Jul 28, 2026
  2. ajianaz commented on Jul 28, 2026

    @ajianaz
    CollaboratorAuthor

    Fixed in #421 (commit d2dfaa5). Replaced N per-file queries with single batch load + mtime:size cheap fingerprint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancephase-1priority:medium

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions