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

What's the best index for $eq only, or perhaps JOINing collections? #189

Open
patarapolw opened this issue Nov 25, 2020 · 1 comment
Open

Comments

@patarapolw
Copy link

patarapolw commented Nov 25, 2020

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/LokiJS-Forge/LokiDB/blob/master/CONTRIBUTING.md#question

Current behavior

Currently, I am using RangedIndex for everything, even if I will never perform > or <.

    zhToken = zh.addCollection('token', {
      unique: ['entry'],
      rangedIndexes: {
        sub: { indexTypeName: 'avl', comparatorName: 'js' },
        sup: { indexTypeName: 'avl', comparatorName: 'js' },
        variants: { indexTypeName: 'avl', comparatorName: 'js' },
        tag: { indexTypeName: 'avl', comparatorName: 'js' }
      }
    })

Where sub, sup, variants, tag are all string[], and not supported to be sorted upon.

Expected behavior

Maybe, a faster index is needed, depending on use case. Not everything is avl/js.

Environment


LokiDB version: 2.1.0
Browser/Node version: Node 12.19.0
@greaterking
Copy link

I'm curious about this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants