Skip to content

#406 SQLite PRAGMA tuning for throughput #408

Closed

Description

@ajianaz

Problem

SQLite is opened with only journal_mode=WAL; foreign_keys=ON. Missing key throughput PRAGMAs.

Location

src/index/mod.rs:35-36 and src/engine/db_writer.rs:184-185

Solution

Add to open_global_index():

PRAGMA synchronous = NORMAL;
PRAGMA cache_size = -64000;
PRAGMA mmap_size = 268435456;
PRAGMA temp_store = MEMORY;

Expected Impact

1.2-1.5x overall. Trivial change, zero risk.

Activity

  1. ajianaz commented on Jul 28, 2026

    @ajianaz
    CollaboratorAuthor

    Closed by #421 — N+1 get_symbol_by_id replaced with single WHERE id IN (...) query via batch_get_symbols().

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions