Date range queries going too slow for you? SQL Performance got you down? I have one weird trick that might just help you out! (SQL Developers hate this!)*

If you have a class that records timestamps when the data is added, then that data will be in sequence with your IDKEY values - that is, TimeStamp1 < TimeStamp2 if and only if ID1 < ID2 for all IDs and TimeStamp values in table - then you can use this knowledge to increase performance for queries against TimeStamp ranges. Consider the following table:

17 9
1 26,470


somehow my installation on win10 canceled during finish. "Installation of Caché finished" showed up for 20 minutes and canceled with an error I didn't saved.

Every file and service was installed but never registered as successfull installation. Now I try to reinstall it but the installer shows me everytime "Another installation is already in progress. Please finish the second installation first".

The unfinished installation is broken. I can't startup Caché from launcher. So I deleted everything in c:/intersystems

Things I already tried:

0 9
0 767
Preston Exley · May 27, 2021
JDBC counts don't match

I'm using a JDBC driver to connect PGSQL -> Cache. I'm noticing when I run SELECT queries and COUNT(*) command against the same table, I get different result sets. I'm pretty new to Cache in general - so I'm trying to understand why these would be different.

Examples (TransID and InvNum should occur in every "row"):

SELECT COUNT(*) FROM ACCT.Services = 1,090,324 WHERE ACCT.Dept = 483

SELECT TransID FROM ACCT.Services = 1,085,776 WHERE ACCT.Dept = 483

SELECT InvNum FROM ACCT.Services = 586,023 WHERE ACCT.Dept = 483

0 8
0 136
Rodrigo Flores · Jan 21, 2020

Hi there,
We need your help, in the build pivot with DMX, we don't can run the pivot. The MDX use is:

WITH MEMBER [Measures].[CondicionesContCompleta] AS ( IIf([Measures].[CondicionesContCompleta] = Null, 0,[Measures].[CondicionesContCompleta] ) ) SELECT NON EMPTY ( [Gerencia].Gerencia].[Gerencia] ) ON ROWS, NON EMPTY ( [Measures].[CondicionesContCompleta] ) ON COLUMNS FROM [Condiciones]

and when we executed the pivot display the next dialog.

Error#5001: Expected operator within tuple: ('SELECT' @pos 156)(2)

0 7
0 223

Hi All,

Can you please guide me on how to restore the .cbk file from the 2015 Cache version into the 2017 version or any other versions of Cache or IRIS software? I have a new instance on my server. It's an entirely new server. I have a .cbk backup file. I want to restore the backup file into a new namespace which one I will create on my new server. When I am trying on ^DBREST utility, I am getting "This is not a Cache Backup File" this error.

Please advise on this. It's a bit urgent.


Arun Kumar.

0 6
0 329

I running a query and get the results inside a result set. Now I have to iterate through the result set many times. From the doc I've seen only the Next() method. Is there a way to reset the cursor? Otherwise what is a good data structure to save multiple rows of a table?

My code in this case is something like this:

set sql = "SELECT * FROM MY_TABLE WHERE X= '"_Y_"'"
set status = ..Adapter.ExecuteQuery(.rs, sql)
// somehow iterate the rs more than one time

0 6
1 703
Neerav Adam Verma · Feb 13, 2020
Class Queries

Class Queries in InterSystems IRIS (and Cache, Ensemble, HealthShare) is a useful tool that separates SQL queries from Object Script code. Basically, it works like this: suppose that you want to use the same SQL query with different arguments in several different places.In this case you can avoid code duplication by declaring the query body as a class query and then calling this query by name.

0 6
0 434

Hi, guys,

I'm working on zen report to display an examination report for a client.

They stored order information in several tables. Examination findings and diagnosis were recorded in a html page and codes of the page was stored in another table. We need to put them together in one single report.

So far we can only read the html codes from that table which is a whole page since it start from label <html> and have <header>. We know that if we are using javascript we can display the page by assigning the codes to innerHtml property of an iframe object.

0 6
0 440

I am currently working on an Upgrade to HealthShare 2019.1.1. As described in the steps once the upgrade was complete to run $system.OBJ.Upgrade(). When I run $system.OBJ.Upgrade() , it is not finding any classes to update. However I am getting an Error 5116 on one of my Productions...

Class dictionary version for '%1' is out of date, please run upgrade utility $system.OBJ.Upgrade()

so if I am running $system.OBJ.upgrade() why isn't it updating this production as it should?

1 5
1 526

How to find a global's original namespace ? Potentially mapped from a different namespace .

I have a global ^Custom that exists in multiple namespaces but it could mapped from namespace Drone(A) to Launch(B)

Without access to Cache management portal how to find where is my global located using cache code ?

Like if ^Custom == ^[Drone]Custom ??

0 5
0 243

I want to INSERT a record in a database using JDBC in OBJECTSCRIPT. At the same time, I want to obtain the insert ID. Is there a way to achieve this using the SQL Outbound adapter?

My code is something like this now:

Property Adapter As EnsLib.SQL.OutboundAdapter;

set sql = " INSERT INTO Prenotazioni_CUP "_
" (ID, cf
" VALUES (SEQTAB.NextVal, ?) "
set status = ..Adapter.ExecuteUpdate(.rs, sql, pRequest.cfAssistito)

0 5
0 244
Suman Samanta · Mar 22, 2022
load and compile from java

Hi i am trying to load and compile one class from java . I am following this code. I am using iris 2021.2

irisConnection = (IRISConnection) DriverManager
.getConnection("jdbc:IRIS://", "username", "password");
iris = IRIS.createIRIS(irisConnection);
iris.classMethodStatusCode("%SYSTEM.OBJ", "Load", "/filePath/SumanPramodTest.test3.CLS.xml","/displaylog=0 /displayerror=0");

0 5
0 262

Prospects, Customers, and Employees can now download IRIS and IRIS for Health both Community and Enterprise editions on

This will allow for new features not yet released to be tested by prospective customers and current customers to sample the latest and greatest that is in the works.

How to View:

For Prospects simply selecting an option with "(Preview)" in the Name will allow for download of preview software

0 5
0 232
Neerav Adam Verma · Mar 5, 2019
PrimaryKey vs Idkey

Just wondering an Insight in the difference between these two indexes

IdKey / PrimaryKey

Property Identifier As %Integer

Index Index1 on Identifier [Idkey]

Index Index2 on Identifier [PrimaryKey]

What's the difference?

1. If I don't have Index1 and only have Index2, then cache does still make its own id.
So how and why do I ever use the PrimaryKey. In Joins ??

1 4
0 775

Hi, guys,

One of my clients was required by the hospital to name their webservice operation as Action_Subject, ie. Get_PatientInfo

When I define the web method as "Get_PatientInfo" as below,

/// MyApp.MyService
Class MyApp.MyService Extends %SOAP.WebService [ ProcedureBlock ]

/// Name of the WebService.
Parameter SERVICENAME = "MyService";

/// TODO: change this to actual SOAP namespace.
/// SOAP Namespace for the WebService
Parameter NAMESPACE = "";

0 4
0 557
Peter Everett · Sep 22, 2016 3m read
Windows write caching

(This article was reviewed in February 2021. It is still relevant to Caché-based installations and similarly applies to IRIS-based installations.)

This article discusses the Windows write caching setting which can leave systems vulnerable to data loss or corruption in the event of power loss or operating system crash. The setting is on by default in some Windows configurations.

10 3
1 1,654