Memory Threshold Issue

Hi,

We are facing the below error while trying to execute the expression rule to fetch data from data base table:

An error occurred while evaluating expression: listofIDtodelete:rule!abc(cons!xyz) (Expression evaluation error in rule 'abc' at function a!queryEntity [line 5]: An error occurred while retrieving the data. Details: Memory threshold reached during output conversion (rule: [queryentity expression], type: [DataReportDT7042], threshold: [1,048,576 bytes], objects successfully converted: [131,071])) (Data Outputs)

Please provide your help regarding the resolution of this issue.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to Mike Schmitt

    I agree with Stefan.  You're making this about two hundred thousand times harder than it needs to be.  You're gathering 100,000 ids, storing 100,000 IDs in a PV, then doing 100 subprocesses that each handle a Delete from Datastore node that is MNI 1000 times.  Or maybe trying a forEach with a delete from datastore rule that can be cloned up to a million times.  For what?  Since you're not filtering, your ultimate result will be an empty table.

    Just use the TRUNCATE command.  One step.  No Appian, no PV with mountain of data eating your RAM, no looping.  Just a few seconds and empty table.  Just get a DBA to TRUNCATE the table if you want it to have 0 rows.  Or "Execute Stored Procedure" and the stored procedure in question has only 1 line of code: TRUNCATE TABLE <name>;

    Good point Mike, but we're in the realm of optimizing code before removing it.

Children