Skip to content

Perf: Names with acronyms, eg "C Brown" are very slow #14933

@NickCrews

Description

@NickCrews

Queries without a full first name, eg "C Brown" vs "Christopher Brown", are very slow. These two benchmarks are very dependent on the caches state. If I rerun them, then I get the result back immediately (nice!). So for accurate tests, make sure you wait ~15 minutes between executions. Or if you have other ways to skip the cache so for easier benchmarking, then I'm interested to hear that as well.

Christopher Brown

C Brown

I'm wondering:

  • can we improve this? Eg by adding an index on just the first letter of the first name? I think you are using postgres, but not sure. This seems like a pretty common pattern that would be good to optimize
  • If we can't improve it, can we at least pin down the exact conditions that cause this so I know what sorts of queries to avoid? eg is it just when there are any single letter tokens in the name?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions