Not able to retrieve data from DB

Hi All,

I am running below query to get the data from a table which has 1000+ rows . But it gives me error "Expression evaluation error at function a!queryEntity: An error occurred while retrieving the data." .

When i query DB it doesn't take more than 20 ms . Any help on what can be done?

a!queryEntity(
entity: cons!XYZ,
query: a!query(
logicalExpression: a!queryLogicalExpression(
operator: "AND",
filters: {
a!queryFilter(
field: "helpId",
operator: "=",
value: 2
)
},
ignoreFiltersWithEmptyValues: true
),
pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: -1
)
),
fetchTotalCount: true
).data

Thanks in advance

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    There could be various reasons for this. So you have to narrow down the possiblities.

    1. Datastore is verified for the entity. As it might be possible something changed in the view or table which is causing the connection between the datastore and the DB.

    2. Since you are querying all the data, there can be the possibility that the server limit of QE is reached and thus giving you the error. So try to reduce the batch size.

    3. Try to reduce the number of columns in the QE, As I see you are fetching all the columns.

    4. Database connection issue.

    Let me know if it helps

Reply
  • 0
    Certified Senior Developer

    There could be various reasons for this. So you have to narrow down the possiblities.

    1. Datastore is verified for the entity. As it might be possible something changed in the view or table which is causing the connection between the datastore and the DB.

    2. Since you are querying all the data, there can be the possibility that the server limit of QE is reached and thus giving you the error. So try to reduce the batch size.

    3. Try to reduce the number of columns in the QE, As I see you are fetching all the columns.

    4. Database connection issue.

    Let me know if it helps

Children
No Data