a!queryEntity() timeout

Hello!

We encountered a strange issue, one of our queries runs ok from oracle developer but sometimes ago started to fail in Appian. Appian reported it as rule error but in the log there is a timeout. We have it as 30 seconds and from oracle developer the query runs in 1-2 seconds.

What can cause such difference between using query from database tool and from appian?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Hi  as per my understanding, you can also consider the following points as mentioned below:

    1. Make the use of Query entity with paging info with less batch size, let's say between 25 - to -100.

    2. If you are trying to query the View using query entity, then I would recommend switching to materialised view as this will give you much better performance compared to Views.

    3. Try to avoid clumsy manipulations as much as you can , such as multiple filter conditions, aggregations etc..

    4. Try to avoid multiple columns or huge amount of data entry for each row in DB.

    5. If possible, try optimising your expression rule.

    5. Once you are done with above mentioned steps, and still facing the issues, try querying one row and check how much time it's taking to return the response.

    6. Additionally could you please check with your system administrator about all the engine status and the CPU usage/ utilisation of the server where your Appian instances are running, because sometime due to some other application/ root cause you might be facing the issues,as you said, it's stopped working at sudden.

    Also, when you query the data from database in Appian / any other tools/programming language, first they need to retrieve the data and need to format the response as per their standard, such as datasubset/dictionary in case of Appian. Hence due to this you can expect minor difference in query execution duration while comparing with executing the same directly in DB Console.

    Hope above mentioned step will help you in debugging and solving this.

Reply
  • 0
    Certified Lead Developer

    Hi  as per my understanding, you can also consider the following points as mentioned below:

    1. Make the use of Query entity with paging info with less batch size, let's say between 25 - to -100.

    2. If you are trying to query the View using query entity, then I would recommend switching to materialised view as this will give you much better performance compared to Views.

    3. Try to avoid clumsy manipulations as much as you can , such as multiple filter conditions, aggregations etc..

    4. Try to avoid multiple columns or huge amount of data entry for each row in DB.

    5. If possible, try optimising your expression rule.

    5. Once you are done with above mentioned steps, and still facing the issues, try querying one row and check how much time it's taking to return the response.

    6. Additionally could you please check with your system administrator about all the engine status and the CPU usage/ utilisation of the server where your Appian instances are running, because sometime due to some other application/ root cause you might be facing the issues,as you said, it's stopped working at sudden.

    Also, when you query the data from database in Appian / any other tools/programming language, first they need to retrieve the data and need to format the response as per their standard, such as datasubset/dictionary in case of Appian. Hence due to this you can expect minor difference in query execution duration while comparing with executing the same directly in DB Console.

    Hope above mentioned step will help you in debugging and solving this.

Children
  • Thanks Alok, your list looks quite comprehensive.

    I tried all of that apart materialized view that was in my plan.

    Unfortunately, our database structure is pretty complex and Oracle sometimes runs the same query with different execution plan and times long.

    As data volume would continue to grow I started to think to organize some staging table with all needed data filtered by a stored procedure call without so strict timeout.