﻿ Which global mapping definition is better? | InterSystems Developer

Which global mapping definition is better?

Primary tabs

Sometimes global mapping of the same globals can be defined in different ways. E.g., I need to define it for 3 globals ^qAuditC, ^qAuditLog, ^qAuditLogC from the same database named APP-NOJOURN. Which approach should be better from the performance point of view?

1) qAudit* => APP-NOJOURN (one record in global mapping table)

2) qAuditC => APP-NOJOURN
qAuditLog => APP-NOJOURN
qAuditLogC => APP-NOJOURN (three records in global mapping table)

From one hand, the less records in global mapping table, the better. From other hand, * can cause additional processing at run time. Global mapping table for a namespace contains about 20 records and can be compressed to 15 ones if "unduplicated" such way.

Any advice will be great appreciated.

P.S. I'm pretty sure that there would be no globals masked as qAudit* but those listed above.

  • 0
  • 0
  • 240
  • 2
  • 1



if you don't care about maintenance effort the most exact pointer is preferable.

As you may see from Ensemble the number of entries in the mapping table is of no importance.
With modern hardware, saving memory is of no importance anymore.


I agree with you. BTW, from the maintenance point of view it seems to be better as well, as it makes easier to implement such tasks as mapping schema conversion, because Caché is not so good in wild cards processing. 


Personally, I would definitely recommend using variant 1 with * . It seems to  me shorter, brighter and clearer.

I would not worry about the speed of evaluation *  (just feeling - certainly I have no numbers or proofs about performance).

If I am correct and remember well the ISC courses, the "global directory/list of global vectors" is held somewhere in memory  for each process while beeing in certain namespace. And therefore should be quickly evaluated.

Additionally, if you would need to add a new global in the future (such as qAuditS for streams), then the current definition will satisfy such need automatically and without updating the map table. However similar mapping for the different LIVE / TEST / EDU / CLONE / ... instances should always be done by scripts and automatically during the upgrade every instance.