QueryEntity Failing when passing 1000 ids on column using IN operator

Certified Senior Developer

Hi All,

I am getting around 2000 ids in one local and then passing that ids to one of column in queryfilter using IN operator. But when i test the rule I get this error as:

An error occurred while retrieving the data. 

So we split the ids in batches by taking 1000 ids in a set and then pass these id to queryfilter through looping. But still it failed with above error.

We have already optimized the view also and same query when we run in DB side it took just 0.170sec to bring the data. But same is not working in Appian queryentity.

Can anyone please suggest what could be the reason behind this and what all steps we can try to get this working. 

Thanks in Advance..

  Discussion posts and replies are publicly visible

Parents
  • This error is generated because either you are passing too long of an input to the DB or the DB is returning too much data to Appian (1 MB of data is the default limitation for Appian queries).

    Is this an Oracle DB?  There are some known limitations which could be related such as ORA-01795 maximum number of expressions in a list is 1000.

    I would ask to see if there is any further information in the logs as well.

    Have you tried looping with something lower such as 500 values at a time?

    Generally this method you are using is not scalable when the list of IDs can grow this large and I would look to other designs to accomplish the outcome.

  • 0
    Certified Senior Developer
    in reply to Chris

    Yes we have Oracle DB and we also found this ORA-01795 maximum number of expressions in a list is 1000. And that is why we used that looping thing.

    And we are querying data from DB with batchsize as 50 only to limit the data size and row.

    Yes as per your last comment this id will surely increase in PROD so do you have any suggestion to change this design.

Reply
  • 0
    Certified Senior Developer
    in reply to Chris

    Yes we have Oracle DB and we also found this ORA-01795 maximum number of expressions in a list is 1000. And that is why we used that looping thing.

    And we are querying data from DB with batchsize as 50 only to limit the data size and row.

    Yes as per your last comment this id will surely increase in PROD so do you have any suggestion to change this design.

Children