Skip to content

[SCIM] Performance issue filtering on MongoDb #926

@gabrielemilan

Description

@gabrielemilan

Hello,

we are using SCIM on MongoDb database.

We facing issue calling this:

/Groups?filter=eventid eq "150017355"&startIndex=1&count=100&excludedAttributes=meta,schema,members

that is translated in:

{
"Attribute.SchemaAttributeId": "26d51050-4962-4348-a6cb-310c198eeee3",
"$expr": {
"$eq": [
{ "$toLower": { "$ifNull": ["$Attribute.ValueString", ""] } },
"150017355"
]
}
}

Because of $toLower and $ifNull, MongoDB cannot use the existing indexes and is forced into a full collection scan

Documents examined: ~859k
Documents returned: 9
Execution time: ~2.11 minutes

Can you please help us?

Regards.
Gabriele

Metadata

Metadata

Labels

bugSomething isn't working

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions