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

Slow concepts/mappings select #1035

Closed
rkorytkowski opened this issue Oct 12, 2021 · 1 comment
Closed

Slow concepts/mappings select #1035

rkorytkowski opened this issue Oct 12, 2021 · 1 comment
Assignees

Comments

@rkorytkowski
Copy link
Contributor

DB reports the following query as slow:
2021-10-12 09:59:10 UTC:10.1.11.167(56360):postgres@postgres:[20237]:LOG: duration: 51915.650 ms statement: SELECT "concepts"."id", "concepts"."public_access", "concepts"."created_at", "concepts"."updated_at", "concepts"."created_by_id", "concepts"."updated_by_id", "concepts"."is_active", "concepts"."extras", "concepts"."uri", "concepts"."version", "concepts"."released", "concepts"."retired", "concepts"."is_latest_version", "concepts"."name", "concepts"."full_name", "concepts"."default_locale", "concepts"."supported_locales", "concepts"."website", "concepts"."description", "concepts"."external_id", "concepts"."concept_class", "concepts"."datatype", "concepts"."comment", "concepts"."parent_id", "concepts"."versioned_object_id", "concepts"."mnemonic" FROM "concepts" WHERE ("concepts"."is_active" AND NOT "concepts"."retired" AND "concepts"."is_latest_version" AND NOT ("concepts"."public_access" = 'None')) ORDER BY "concepts"."updated_at" DESC LIMIT 25

We need to include "updated_at" in the multi-field index.

@rkorytkowski rkorytkowski self-assigned this Oct 12, 2021
rkorytkowski added a commit to OpenConceptLab/oclapi2 that referenced this issue Oct 12, 2021
rkorytkowski added a commit to OpenConceptLab/oclapi2 that referenced this issue Oct 12, 2021
@rkorytkowski
Copy link
Contributor Author

Same applies to mappings...

@rkorytkowski rkorytkowski changed the title Slow concepts select Slow concepts/mappings select Oct 12, 2021
rkorytkowski added a commit to OpenConceptLab/oclapi2 that referenced this issue Oct 12, 2021
rkorytkowski added a commit to OpenConceptLab/oclapi2 that referenced this issue Oct 12, 2021
rkorytkowski added a commit to OpenConceptLab/oclapi2 that referenced this issue Oct 12, 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

1 participant