-
Bug
-
Resolution: Done
-
Undefined
-
None
-
False
-
-
False
-
-
Describe the bug
If querying users by attribute values the response is really slow.
On further investigation the query is missing the database index because attribute name and value is queried by lower value, eg. lower(name) and lower(value).
Either remove lower and match the actual value (which seems to be the more reasonable approach) or add a matching new index to the attribute table:
``` CREATE INDEX index ON user_attribute(lower(name), lower(value)); ```
-
-
- Version
-
18.0.1
-
-
- Expected behavior
-
Query by attribute returns in a reasonable time.
-
-
- Actual behavior
-
Query takes really long and produces a lot of load on the database.
-
-
- How to Reproduce?
-
Just query by attribute.
-
-
- Anything else?
-
Adding a max value to the query totally breaks the request. (Timeouts)
- links to