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