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

Assets serial column should have an index #8486

Closed
travismiller opened this issue Sep 30, 2020 · 4 comments
Closed

Assets serial column should have an index #8486

travismiller opened this issue Sep 30, 2020 · 4 comments

Comments

@travismiller
Copy link
Contributor

Server (please complete the following information):

  • Snipe-IT: v4.9.3
  • OS: Ubuntu 16.04 (Docker)
  • Web Server: Apache
  • PHP Version: 7.1.33

Is your feature request related to a problem? Please describe.
Importing assets with artisan snipeit:import takes significantly longer when assets have a serial number.

Describe the solution you'd like
Add an index to column assets.serial.

Describe alternatives you've considered
N/A

Additional context

16000 assets without Serial Number
without index: ~6 minutes
with index: ~6 minutes

16000 assets with Serial Number
without index: ~1 hour ⚠️
with index: ~6 minutes

@travismiller
Copy link
Contributor Author

I’m happy to submit a PR if this suggested solution is acceptable.

@snipe
Copy link
Owner

snipe commented Sep 30, 2020

Do you have unique serial numbers enabled in your settings?

@travismiller
Copy link
Contributor Author

Yes, the setting is enabled.

@uberbrady
Copy link
Collaborator

We would take a PR that added a non-unique index for serial (some users have duplicated serial numbers for some bizarre reason. We need to support that, unfortunately).

travismiller added a commit to tulsaschoolsdata/snipe-it that referenced this issue Jun 9, 2021
travismiller added a commit to tulsaschoolsdata/snipe-it that referenced this issue Jun 9, 2021
travismiller added a commit to tulsaschoolsdata/snipe-it that referenced this issue Jun 9, 2021
travismiller added a commit to tulsaschoolsdata/snipe-it that referenced this issue Jun 9, 2021
travismiller added a commit to tulsaschoolsdata/snipe-it that referenced this issue Jun 9, 2021
snipe added a commit that referenced this issue Jun 10, 2021
@snipe snipe closed this as completed in ebe7c2d Jun 10, 2021
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

3 participants