Timeout issue with Query Entity

Hi,

We are experiencing problems with a query entity. When we pass a query filter with multiple filters on the same varchar column, the query entity takes around 9 sec to give us the result. When the query entity rule is called from process model it fails 2 out 3 times. The query filter is written like this.

a!queryLogicalExpression( operator: "OR", filters:{ a!queryFilter(field:"text_column1",operator:"IN",value:{""}),a!queryFilter(field:"text_column1",operator:"IS NULL")})

When we remove on of the condition it only take 200 ms.

a!queryLogicalExpression( operator: "OR", filters:{ a!queryFilter(field:"text_column1",operator:"IN",value:{""})})

Is there any reason for this or can we write this query in a different format?

Also, this is not a data threshold issue as the batch size is 1.

Thanks,
Sangho

OriginalPostID-254312

  Discussion posts and replies are publicly visible

Parents
  • @sanghapriyab Appian documentation says

    When saving the values of a CDT to a database, a NULL value is not stored as NULL - instead, it is stored as an empty string ‘’.

    Appian converts any NULL values of a CDT text field into an empty string. Writing an empty string to the database is safer than writing NULL value; a NULL value if not handled correctly can lead to NULL pointer exceptions.

    When comparing values returned from a data store, use lenb() to check the length in bytes is 0 which would be the equivalent of a NULL value.

    According to this write your query entities and and use lenb() function to know returned value is null or not.
Reply
  • @sanghapriyab Appian documentation says

    When saving the values of a CDT to a database, a NULL value is not stored as NULL - instead, it is stored as an empty string ‘’.

    Appian converts any NULL values of a CDT text field into an empty string. Writing an empty string to the database is safer than writing NULL value; a NULL value if not handled correctly can lead to NULL pointer exceptions.

    When comparing values returned from a data store, use lenb() to check the length in bytes is 0 which would be the equivalent of a NULL value.

    According to this write your query entities and and use lenb() function to know returned value is null or not.
Children
No Data