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

Add MongoDB index to dataset property in attachments #1285

Merged

Conversation

ianbush
Copy link
Contributor

@ianbush ianbush commented Jun 26, 2024

Description

Add a new index to MongoDB for the dataset property in attachments.

Motivation

Performance for loading attachments on the dataset view page becomes very slow as the number of datasets increases. New datasets are very slow to look-up the attachments, spiking CPU use. This just adds an index to the attachments table for datasets, which fixes the slow performance. For Diamond, with 10,000 datasets, this takes the time to find the attachment from 10s of seconds to a 10s of milliseconds.

Fixes:

Please provide a list of the fixes implemented by this PR

  • N/A

Changes:

Please provide a list of the changes implemented by this PR

  • Add index to dataset property in attachements

Tests included

  • Included for each change/fix?
  • Passing? (Merge will not be approved unless this is checked)

Documentation

  • swagger documentation updated [required]
  • official documentation updated [nice-to-have]

official documentation info

If you have updated the official documentation, please provide PR # and URL of the pages where the updates are included

@nitrosx nitrosx merged commit 36ce449 into SciCatProject:master Jun 26, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants