-
-
Notifications
You must be signed in to change notification settings - Fork 781
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
[API] Test statistics query effficiency needs improving #7778
Comments
@martonmiklos FYI |
Uh, I will look into it. How did you activated this sql debug output? |
Use the env var |
There are certain thresholds defined (>25 queries or >0.1s). Set them to a lower value (1 for to log for all requests). You can find them in the settings.py right after the implementation for the previously mentioned querycount enable var. just search with your code editor. |
Please verify that this bug has NOT been raised before.
Describe the bug*
New test statistics API endpoint needs optimizing for number of database hits:
Ref: #7164
Steps to Reproduce
Expected behaviour
API / database queries should be annotated to prevent duplicate queries
Deployment Method
Version Information
Version Information:
InvenTree-Version: 0.16.0 dev
Django Version: 4.2.14
Commit Hash: c2c66c5
Commit Date: 2024-07-31
Commit Branch: build-test-results
Database: postgresql
Debug-Mode: True
Deployed using Docker: True
Platform: Linux-5.15.133.1-microsoft-standard-WSL2-x86_64-with
Installer: DOC
Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.1.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'InvenTreeCurrencyExchange', 'slug': 'inventreecurrencyexchange', 'version': '1.0.0'}, {'name': 'InvenTreeLabel', 'slug': 'inventreelabel', 'version': '1.1.0'}, {'name': 'InvenTreeLabelMachine', 'slug': 'inventreelabelmachine', 'version': '1.0.0'}, {'name': 'InvenTreeLabelSheet', 'slug': 'inventreelabelsheet', 'version': '1.0.0'}, {'name': 'DigiKeyPlugin', 'slug': 'digikeyplugin', 'version': '1.0.0'}, {'name': 'LCSCPlugin', 'slug': 'lcscplugin', 'version': '1.0.0'}, {'name': 'MouserPlugin', 'slug': 'mouserplugin', 'version': '1.0.0'}, {'name': 'TMEPlugin', 'slug': 'tmeplugin', 'version': '1.0.0'}]
Please verify if you can reproduce this bug on the demo site.
Relevant log output
The text was updated successfully, but these errors were encountered: