Expand my Community achievements bar.

SOLVED

AEM Headles GraphQL query slow

Avatar

Level 2

version: 6.5.17.0

method: Content Fragment GraphQL APIs

Use different folders to differentiate languages, a total of 1452 records (En: 726 records, ZH-HK: 726 records).

Query:

query queryAllADOForms($lang: String!) {
adoFormsList(
_locale: $lang
) {
items {
_path
name
formName
formCode
formCategories
formPurpose
attachment {
... on DocumentRef {
_path
}
}
hiddenSearchableField {
plaintext
}
additionalViewersWhenPublished
expiryDate
lastModified
}
}
}

 

execute query:

Usually 10 seconds, sometimes longer.

Screenshot 2023-07-11 at 16.50.00.png

 

Are there any ideas to improve the efficiency of the query?

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You can do the following:

1) Check the query is performant, make sure this has an index. 

2) Make sure this is being cached and check the performance against a cache layer

3) Analyze if you have the chance to use paging to reduce the initial result set

 

Check these recommendations which can help as well:

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-ap...

 



Esteban Bustamante

View solution in original post

2 Replies

Avatar

Community Advisor

hello @darrendu 

 

If you are on AEM on-premise, please refer to latest release notes. It suggests to install a graphql index package for better performance

 

https://experienceleague.adobe.com/docs/experience-manager-65/release-notes/release-notes.html?lang=... 

 

Once this is done, please check for the logs for any traversal messages,while executing GraphQL queries. If any custom property, ordering etc is used, please consider optimizing indexes.


Aanchal Sikka

Avatar

Correct answer by
Community Advisor

You can do the following:

1) Check the query is performant, make sure this has an index. 

2) Make sure this is being cached and check the performance against a cache layer

3) Analyze if you have the chance to use paging to reduce the initial result set

 

Check these recommendations which can help as well:

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-ap...

 



Esteban Bustamante