keep information in pv or from database

I have a question about CDT as process variable or getting "on demand"

I mean:

We have to approaches to read information of a CDT in a process

1) We can keep CDT and read its information using a process variable 

2) We can read CDT information by a query rule . For example rule!getMyCDTbyID(id:10).parameter1, rule!getMyCDTbyID(id:10).parameter2 ... etc

 

I would know what method is better 

The first one keep data in memory, so if the CDT has a lot of data , the process  wastes RAM 

The second one read from DB. If Appian store as cache the rule return data , this method is better but if the rule execute a DB query each time a parameter is read , maybe it can overload the DB .. or not ? 

 

Any ideas about ? 

Thanks

Elia 

  Discussion posts and replies are publicly visible

Parents
  • Hi Elia,

    Either is technically correct, but depending on your set of circumstances and the nature of your data, one may be better than the other. For example, if your process has a long life span and the data has the potential to be changed by other processes, it's better to query for the CDT. That way you can be sure that you're always getting the most up-to-date version of the CDT data. Otherwise, it is generally better to query for the data once in your process. This will improve performance.

    Regards,
    Jake
Reply
  • Hi Elia,

    Either is technically correct, but depending on your set of circumstances and the nature of your data, one may be better than the other. For example, if your process has a long life span and the data has the potential to be changed by other processes, it's better to query for the CDT. That way you can be sure that you're always getting the most up-to-date version of the CDT data. Otherwise, it is generally better to query for the data once in your process. This will improve performance.

    Regards,
    Jake
Children