Skip to main content

General System Limits

This page lists some of the system limits for InterSystems IRIS®.

For limits on identifier names, see Rules and Guidelines for Identifiers.

For additional system-wide limits, see the Configuration Parameter File Reference.

String Length Limit

There is a limit to the length of a value of a string: 3,641,144 characters.

Important:

It is important to realize that “strings” are not just the result of reading from input/output devices. They can show up in other contexts such as the data in the rows of a result set returned by an SQL query, by construction of $LISTs with a large number of items, as the output of an XSLT transformation, and many other ways.

Class Limits

The following limits apply only to classes:

class inheritance depth

Limit: 50. A given class can be subclassed to a depth of 50 but not further.

foreign keys

Limit: 400 per class.

indexes

Limit: 400 per class.

methods

Limit: 2000 per class.

parameters

Limit: 1000 per class.

projections

Limit: 200 per class.

properties

Limit: 1000 per class.

queries

Limit: 200 per class.

SQL constraints

Limit: 200 per class.

storage definitions

Limit: 10 per class.

superclasses

Limit: 127 per class.

triggers

Limit: 200 per class.

XData blocks

Limit: 1000 per class.

Class and Routine Limits

The following limits apply to both classes and routines:

class method references

Limit: 32768 unique references per routine or class.

The following is counted as two class method references because the class name is different even though the method name is the same.

 Do ##class(c1).abc(), ##class(c2).abc()
class name references

Limit: 32768 unique references per routine or class.

For example, the following is counted as two class name references:

 Do ##class(c1).abc(), ##class(c2).abc()

Similarly, the following is counted as two class references because the normalization of %FileOpens in a new tab to %Library.FileOpens in a new tab is done at runtime, not at compile time.

 Do ##class(%File).Open(x)
 Do ##class(%Library.File).Open(y)
instance method references

Limit: 32768 per routine or class.

If X and Y are OREFs, the following counts as one instance method reference:

 Do X.abc(), Y.abc()

References to multidimensional properties are counted as instance methods because the compiler cannot distinguish between them. For example, consider the following statement:

 Set var = OREF.xyz(3)

Because the compiler cannot tell whether this statement refers to the method xyz() or to the multi-dimensional property xyz, it counts this as an instance method reference.

lines

Limit: 65535 lines per routine, including comment lines. The limit applies to the size of the INT representation.

literals (ASCII)

Limit: 65535 ASCII literals per routine or class.

An ASCII literal is a quoted string of three or more characters where no character is larger than $CHAR(255).

Note that ASCII literals and Unicode literals are handled separately and have separate limits.

literals (Unicode)

Limit: 65535 Unicode literals per routine or class.

A Unicode literal is a quoted string with at least one character larger than $CHAR(255).

Note that ASCII literals and Unicode literals are handled separately and have separate limits.

parameters

Limit: 255 parameters per subroutine, method, or stored procedure.

procedures

Limit: 32767 per routine.

property read references

Limit: 32768 per routine or class.

This limit refers to reading the value of a property as in the following example:

 Set X = OREF.prop
property set references

Limit: 32768 per routine or class.

This limit refers to setting the value of a property as in the following example:

 Set OREF.prop = value
routine references

Limit: 65535 per routine or class.

This limit applies to the number of unique references (^routine) in a routine or class.

target references

Limit: 65535 per routine or class.

A target is label^routine (a combination of label and routine).

Any target reference also counts as a routine reference. For example, the following is counted as two routine references and three target references:

 Do Label1^Rtn, Label2^Rtn, Label1^Rtn2
TRY blocks

Limit: 65535 per routine.

variables (private)

Limit (ObjectScript): 32763 per procedure.

variables (public)

Limit (ObjectScript): 65503 per routine or class.

For limits on the lengths of variable names and other identifiers, see Rules and Guidelines for Identifiers.

Other Programming Limits

The following table lists other limits that are relevant when writing code.

%Status value limits

Length limit of error message: Just under 32k characters.

Maximum number of %StatusOpens in a new tab values that can be combined into a single %StatusOpens in a new tab value: 150.

{} nesting

Limit: 32767 levels.

This is the maximum depth of nesting of any language element that uses curly braces, like IF { FOR { WHILE {...}}}.

characters per line

Limit: 65535 characters per line.

global subscript, length

See Maximum Length of a Global Reference in Using Globals.

global reference, length

Limit: 511 encoded characters (which may be fewer than 511 typed characters). The term global reference refers to the name of the global plus all of its subscripts. For a discussion, see Maximum Length of a Global Reference in Using Globals.

numeric value

Limits (for decimal or native format): Approximately 1.0E-128 to 9.22E145. See Numeric Computing in InterSystems Applications.

Limits (for double format): See Numeric Computing in InterSystems Applications.

FeedbackOpens in a new tab