Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage: Add Indexes for common queries #308

Merged
merged 4 commits into from
Aug 9, 2023

Commits on Aug 7, 2023

  1. Storage: Add Indexes for common queries

    In github#306 it's reported that SQLite is slow.  This adds indexes so lookups will be
    faster.  The intention is to speed up the bottom 3 queries from
    github#306 (comment) as
    they are "the ones to focus on".
    
    Specifically this should speed up:
    
    > * Load graph data for a file
    >
    >         SELECT value FROM graphs WHERE file = ?
    >
    >   Called many times during path stitching
    >
    > * Load paths for a file node
    >
    >         SELECT file,value from file_paths WHERE file = ? AND local_id = ?
    >
    >   Called many times during path stitching.
    >
    > * Load paths for root node
    >
    >         SELECT file, value from root_paths WHERE symbol_stack = ?
    >
    >   Called many times during path stitching.
    
    If the data that you're fetching is in the index then SQLite won't even bother
    reading the row proper, just pulling the data streight from the index (good for
    data locality).  As such I've included not just the columns we're using in the
    `WHERE` clause, but also the ones from `SELECT` too.
    
    I've not actually tested the performance impact as I'm not familiar with this
    project (this is more of a drive-by) and don't know what benchmarks to use.
    wmanley committed Aug 7, 2023
    3 Configuration menu
    Copy the full SHA
    1f5de0e View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2023

  1. Configuration menu
    Copy the full SHA
    07e72e1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    134b7bc View commit details
    Browse the repository at this point in the history
  3. Update authors

    hendrikvanantwerpen committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    ddafce4 View commit details
    Browse the repository at this point in the history