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

use text prefix in regex to speed up query #4776

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Commits on Sep 26, 2023

  1. use text prefix in regex to speed up query

    for selector;
    
    {"selector":{"_id":{"$regex":"doc.+"}}}
    
    before;
    
    {
      "include_docs": true,
      "view_type": "map",
      "reduce": false,
      "partition": null,
      "start_key": [],
      "end_key": [
        "<MAX>"
      ],
      "direction": "fwd",
      "stable": false,
      "update": true,
      "conflicts": "undefined"
    }
    
    after;
    
    {
      "include_docs": true,
      "view_type": "map",
      "reduce": false,
      "partition": null,
      "start_key": [
        "doc"
      ],
      "end_key": [
        "doc�",
        "<MAX>"
      ],
      "direction": "fwd",
      "stable": false,
      "update": true,
      "conflicts": "undefined"
    }
    
    closes: #4775
    rnewson committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    03f5432 View commit details
    Browse the repository at this point in the history