SAP Knowledge Base Article - Public

3679945 - High memory usage and slowness when accessing /odata/v2/BenefitEnrollment

Symptom

High memory usage and slowness when accessing /odata/v2/BenefitEnrollment while using OData queries.

Environment

SAP SuccessFactors Employee Central Global Benefits

Cause

High memory usage and slowness when accessing /odata/v2/BenefitEnrollment caused by OData queries that included $expand on multiple navigation properties (such as userNav, createdByNav, and lastModifiedByNav) without specifying appropriate $select parameters. This resulted in the retrieval and expansion of many unnecessary fields and entities, leading to the generation of complex SQL queries.

In this scenario, two SQL queries generated for the expanded User navigations each took over 4 seconds to execute, consuming excessive memory.

Resolution

To resolve the issue, please follow the below steps:

  1. Using the $select parameter to explicitly specify only the required fields in the navigation expansions.
  2. Avoiding broad expansions of navigation properties without appropriate filtering.

This will streamline the generated SQL, significantly reduce memory consumption, and improve performance. 

Keywords

odata/v2/BenefitEnrollment, BenefitEnrollment, odata, API, High usage , KBA , LOD-SF-EC-GBF , Global Benefits , LOD-SF-INT , Integrations , LOD-SF-INT-ODATA , OData API Framework , How To

Product

SAP SuccessFactors Employee Central all versions