検索

Question
· Jan 10, 2023

Como saber o tamanho (quantidade de linhas) de uma global com comando direto

Existe algum comando que retorna a quantidade de linhas de uma global?

Exemplo:

^test(1)="aa"
^test(2)="aa"
^test(3)="aa"
^test(4)="aa"

Total de linhas = 4

2 Comments
Discussion (2)2
Log in or sign up to continue
Please note that this post is obsolete.
Question
· Dec 14, 2022

Does InterSystems has CDS Hook implementations?

Does InterSystems has CDS Hook implementations?
if yes, where I could get the details.

7 Comments
Discussion (7)3
Log in or sign up to continue
Article
· Nov 28, 2022 2m read

IRIS SQLでは LIMIT/OFFSET句のような機能をサポートしていますか?

Question:

IRISでは、PostgreSQLやMySQLで使うことができる、開始位置や取得件数を指定する LIMIT句やOFFSET句をサポートしているでしょうか?


Answer:

※2025/4/17更新:IRIS2025.1 以降のバージョンでは、LIMIT/OFFSET句をサポートするようになりました。ご参考

残念ながらサポートしていません。
ただ、代わりに使える同様の方法がありますのでご紹介します。

以下のようなSQLクエリをIRIS SQLで行うとします。

SELECT *
  FROM Sample.Person
ORDER BY Name
 LIMIT 3 OFFSET 5


---------------------------------------------------------------------------------
1. サブクエリとビュー ID (%VID)を使用する方法
---------------------------------------------------------------------------------

IRISでは、ビューまたは FROM 節のサブクエリで返される各行に整数のビュー ID (%VID) を割り当てることができます。
%VIDを使用すると、以下のサンプルのようにして同様のことが実現できます。
※%vidについて

SELECT *, %vid FROM (SELECT top all ID, Name
                     FROM Sample.Person
                     ORDER BY Name) v
WHERE %vid BETWEEN 6 AND 8
// 6番目から3つ分 --> 8番目まで


---------------------------------------------------------------------------------
2. OFFSET目までのデータを除いて TOP する方法
---------------------------------------------------------------------------------

SELECT TOP 3 ID, Name FROM Sample.Person WHERE ID NOT IN (SELECT TOP 5 ID
                 FROM Sample.Person
                 ORDER BY Name)
ORDER BY Name

 

---------------------------------------------------------------------------------
3.row_number() 関数を使用する方法
---------------------------------------------------------------------------------

IRIS 2021.1以降でサポートされるようになった ウィンドウ関数の ROW_NUMBER() を使用して実現することも可能です。

SELECT * FROM (
  SELECT row_number() OVER (ORDER BY Name) AS rn, ID, Name
  FROM Sample.Person 
) AS e 
WHERE e.rn BETWEEN 6 AND 8 ORDER BY Name


是非お試しください。

Discussion (0)0
Log in or sign up to continue
Question
· Nov 23, 2022

What is the likelihood of encountering "missing messages" in message bank?

My team works on implementing an Interoperability solution utilizing InterSystems Kubernetes Operator on Red Hat OpenShift container platform. 

We are trying to determine how many messages we can process in any given time. We have a Feeder app running in 10 containers sending 50k messages each to a load balancer all beginning at the same time.

Messages are received via HTTPS protocol by webgateway containers. 

Interoperability production runs in compute pods with persistent data, journals, and WIJ volumes.

We implemented Horizontal Pod Autoscaler to scale compute pods when CPU utilization is high.

We utilize Enterprise Message Bank to have one place to find any message processed by any compute.

We observe the queue for Message Bank operation grows quite large in compute pods.

Sometimes the Autoscaler scales computes down while they are still processing.

How likely is it Messages do not show up in Message Bank if they have been partially or completed processed in compute pods?

Any messages in queues on compute pods which are shutdown will not be processed until the compute pods is started again.

1 Comment
Discussion (1)2
Log in or sign up to continue
Article
· Nov 18, 2022 1m read

Jupyter and IRIS - The Simple Version

There are several great articles in the community showing how to use Jupyter and InterSystems IRIS together, and I encourage you to check them out in the link at the end of this article for more in depth understanding.

This is just another one, the difference is on the simplicity. Do you want to just start a container where Jupyter is already connected to an IRIS instance? Then this is for you!

2 Comments
Discussion (2)1
Log in or sign up to continue