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

Indexing mongodb #1

Open
chrisaq opened this issue Mar 17, 2016 · 2 comments
Open

Indexing mongodb #1

chrisaq opened this issue Mar 17, 2016 · 2 comments

Comments

@chrisaq
Copy link

chrisaq commented Mar 17, 2016

Indexes I've added so far, but might be useful to put in a post install script or similar:

image collection

db.image.ensureIndex({"publicKey": 1, "imageIdentifier": 1}, { background: true })
db.image.ensureIndex({"publicKey": 1, "updated": -1}, { background: true })
db.image.ensureIndex({"publicKey": 1, "added": -1}, { background: true })
db.image.ensureIndex({"user": 1, "imageIdentifier": 1}, { background: true })
db.image.ensureIndex({"user": 1, "added": -1}, { background: true })
db.image.ensureIndex({"user": 1, "updated": -1}, { background: true })

imagevariation collection

db.imagevariation.ensureIndex({"user": 1, "imageIdentifier": 1}, { background: true })
db.imagevariation.ensureIndex({"user": 1, "imageIdentifier": 1, "width": 1}, { background: true })

@chrisaq
Copy link
Author

chrisaq commented Mar 17, 2016

As suggested I removed these indexes:
db.image.ensureIndex({"publicKey": 1, "imageIdentifier": 1}, { background: true })
db.image.ensureIndex({"publicKey": 1, "updated": -1}, { background: true })
db.image.ensureIndex({"publicKey": 1, "added": -1}, { background: true })

It worked out fine.

@christeredvartsen
Copy link
Member

This should be provided as scripts that comes with Imbo that can create the indexes, and mentioned in the docs as well.

@christeredvartsen christeredvartsen transferred this issue from imbo/imbo Sep 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants