You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attatchments, i.e. DocumentFiles, are stored using GridFS in MongoDB, which creates a separate dbobject in the collection documents.files containing the file metadata. In this dbobject, the document that this attachment belongs to is stored in the document field. Queries on this field can be expensive, as it is not indexed.
We've seen queries taking several seconds, which were completely eliminated by setting an index on the document field.
One risk with introducing more indexes in Hydra is that each stage currently creates a new index (see #230 ). An additional index on the attachments will decrease the max number of stages by 1.
It might also be relevant to create an index on the filename, or a compound index on document ID and filename.
The text was updated successfully, but these errors were encountered:
Attatchments, i.e.
DocumentFile
s, are stored using GridFS in MongoDB, which creates a separate dbobject in the collectiondocuments.files
containing the file metadata. In this dbobject, the document that this attachment belongs to is stored in thedocument
field. Queries on this field can be expensive, as it is not indexed.We've seen queries taking several seconds, which were completely eliminated by setting an index on the document field.
One risk with introducing more indexes in Hydra is that each stage currently creates a new index (see #230 ). An additional index on the attachments will decrease the max number of stages by 1.
It might also be relevant to create an index on the filename, or a compound index on document ID and filename.
The text was updated successfully, but these errors were encountered: