I have a class with around 400k lines and 60 columns. Class storage is Cache SQL storage (Mapped from a global).

 I want to create multiple indices on certain fields.

I am familiar with two approaches:

1. Create a new map (Index type) on a pointer global.

2. Create a bitmap index

Which approach is more recommended to be used in the case I described? If there are any other approaches, I will be happy to hear.

Thanks :)

0 11
0 592

Is there a way to omit or skip rollback of some data changes during a transaction rollback? Maybe some sort of "autonomous transaction"?

The issue is with error logging in transaction. For example we may have in nested calls the following structure:
<some code>
<error happens>
<error log to database>

but if this code is in another transaction, and that rolls back we lose error data.

0 7
0 696

Have very little XML experience and have been able to manually create output. Have a need to take data that I store in a M global (example: ^TML("HDATA", ) and out put it in CCDA XML format.

Are there any examples of M code using the XMLWriter to accomplish this?

Or can anyone provide some guidance 

Any help would be greatly appreciated.

0 2
0 514

Globals, these magic swords for storing data, have been around for a while, but not many people can use them efficiently or know about this super-weapon altogether.

If you use globals for tasks where they truly shine, the results may be amazing, either in terms of increased performance or dramatic simplification of the overall solution (1, 2).

Globals offer a special way of storing and processing data, which is completely different from SQL tables. They were first introduced in 1966 in the M(UMPS) programming language, which was initially used in medical databases. It is still used in the same way, but has also been adopted by some other industries where reliability and high performance are top priorities: finance, trading, etc.

Later M(UMPS) evolved into Caché ObjectScript (COS). COS was developed by InterSystems as a superset of M. The original language is still accepted by developers' community and alive in a few implementations. There are several signs of activity around the web: MUMPS Google group, Mumps User's group), effective ISO Standard, etc.

Modern global based DBMS supports transactions, journaling, replication, partitioning. It means that they can be used for building modern, reliable and fast distributed systems.

Globals do not restrict you to the boundaries of the relational model. They give you the freedom of creating data structures optimized for particular tasks. For many applications reasonable use of globals can be a real silver bullet offering speeds that developers of conventional relational applications can only dream of.

Globals as a method of storing data can be used in many modern programming languages, both high- and low-level. Therefore, this article will focus specifically on globals and not the language they once came from.

14 10
0 2,078


If given a global, how can I discover information on that global?  More specifically,  how can I discover how many indices it contains?  ie:  ^G(1,2,3,4,5)   How can I discover that there are 5 subscripts within the Global ^G if I did not already know.

Please advise, and thanks in advance for everyone's time.

0 3
0 294
Confused Developer · May 27, 2017
Insert SQL

I am inserting rows in a table. This table is appearing in all namespace as I did global mapping. 

So once I run insert command from a method, it insert the rows. When I run the same insert command from other namespace, it replace the existing data in table. 

Insert command is same in all namespace but the data I m inserting is different. 

0 2
0 409

Hi, Community!

Is there an option to get an archived file of globals in one command. Say for:

Do $System.OBJ.Export("Class1*D.GBL,Class2*D.GBL","data_gbl.xml")

get something like:

Do $System.OBJ.Export("Data*D.GBL","data_gbl.gz","gzip")

And also to have the convenient one click way to  import it to the namespace via terminal or Control Panel?

If anyone already has this module, share please?

It would be very convenient for import/export/continuous integration purposes cause globals can be really heavy.

0 8
0 737

Currently, we have an application running in one namespace ("Database B") that has globals and routines mapped to another database ("Database A"). After enforcing clean up on Database A, we found that 90% of the disk is free. We would like to compact Database A and release the unused space. However, we are running OpenVMS, which seems to be the issue.

For databases consisting of only globals, we are able to use ^GBLOCKCOPY; however, we need to ensure that the routines and mappings are also copied.

1 8
0 846