发布新帖

查找

公告
· 三月 26, 2024

バージョン2024.1:新機能紹介ウェビナー開催決定!(4月~6月)

開発者の皆さん、こんにちは。

(2024/5/30:6月の日時、ウェビナー内容を更新しました)

InterSystems IRIS、InterSystems IRIS for Healthの新バージョン2024.1がリリースされました。

様々な機能の追加や実験的機能としての追加が行われましたが、その中から以下3種類の内容についてウェビナーを開催します!📣

✅4月23日(火)13時半~14時:IRIS 2024.1の管理用Webサーバ(PWS)廃止に備えて

YouTube公開しました👉https://youtu.be/bVwWZt1oNws?list=PLzSN_5VbNaxCeC_ibw2l-xneMCwCVf-Or

✅5月30日(木)13時半~14時:ベクトル検索機能のご紹介

YouTube公開しました👉https://youtu.be/v0G7K2et_Yk?list=PLzSN_5VbNaxB39_H2QMMEG_EsNEFc0ASz

✅6月25日(火)13時半~14時:FHIR新機能のご紹介~2024.1~

オンデマンド配信はこちら👉https://event.on24.com/wcc/r/4597704/ADA161B6446E6BA01623C875CF596FD0
(資料PDFもオンデマンド配信画面よりダウンロードいただけます)
 

ご参考:リリース案内記事

ウェビナーでご案内する機能以外にも実験的機能も含め多くの機能が追加されていますので、以下簡単に概要をご紹介します。

現在日本語ドキュメントは鋭意翻訳中のため、仕上がるまでの間は英語ドキュメント(IRISリリースノートIRIS for Healthリリースノート)をご参照ください。


管理系

✔ マルチボリュームデータベース: スケーラビリティとストレージ管理の強化

下図はデータベース新規作成の画面ですが、設定項目に [New Volume Threshold Size] の項目が追加されました。
(ドキュメント:Configuring a Multivolume Database

この値を 0 より大きい値に設定した場合、DATが指定サイズを超えると指定フォルダ内に IRIS-000x.VOL というデータベースを作ります。(拡張ファイルとして指定サイズで区切ったデータベースファイルが作成できるようになりました)

 

✔ ファスト・オンライン・バックアップ(実験的機能): バックアッププロセスの合理化

以前より、外部バックアップ(Backup.GeneralクラスのExternalFreeze()/ExternalThaw()を利用する方法)と、オンラインバックアップを提供していますが、このリリースの実験的機能追加は「オンラインバックアップ」に対しての高速化とクラスAPIの用意です。(Bakcup.Onlineクラスが追加されました)

現段階では、Backup.Onlineクラスを利用したバックアップに対しての高速化が行われています。管理ポータルメニューからの実行やDBACKルーチンを利用した実行には影響がありません。お試しいただく場合は、Early Access Program(EAP)へのお申込みをどうそよろしくお願いします。

 

✔ 複数のスーパーサーバポート: ネットワーク構成の柔軟性を提供

お馴染みの1972番以外のポート番号をスーパーサーバポートとして追加できるようになりました。(JDBC/ODBC経由のアクセスがある時は別ポートでアクセス、など柔軟に対応できるようになりました)

設定は、管理ポータル > [システム管理] > [セキュリティ] > [Superservers] から行えます。
(ドキュメント:Managing SuperServers

52774のポートを追加した例:

 
JDBCでの接続の例

SQL

✔ JSON_TABLE関数、With句のサポート追加

(ドキュメント:JSON_TABLE (SQL)WITH (SQL))​​​​

JSON_TABLE()関数では、%Net.GetJson()を利用して外部サイトからの結果をそのまま使用することもできます。

例)zipcloudのAPIを使用した例です。

〒0790177で取得できる結果のJSONを使用しています(https://zipcloud.ibsnet.co.jp/api/search?zipcode=0790177

メモ:httpsを使用するため、%Net.GetJson()の第2パラメータに予め管理ポータルで設定したSSL/TLS構成名を指定しています。​

設定は、 [システム管理] > [セキュリティ] > [SSL/TLS構成] メニューを開き、「構成名」に任意名を設定し、「保存」ボタンをクリックします(そのほかの構成パラメータは、デフォルト値で作成します)。

例では、”test” の名称で作成した構成名を指定しています。({"SSLConfigration":"test"})

SELECT address1,address2,address3,kana1,kana2,kana3,zipcode
  FROM JSON_TABLE(%Net.GetJson('https://zipcloud.ibsnet.co.jp/api/search?zipcode=0790177','{"SSLConfiguration":"test"}')
,
  '$.content.results'
    COLUMNS ( address1 VARCHAR(100) PATH '$.address1',
              address2 VARCHAR(100) PATH '$.address2',
              address3 VARCHAR(100) PATH '$.address3',
              kana1 VARCHAR(100) PATH '$.kana1',
              kana2 VARCHAR(100) PATH '$.kana2',
              kana3 VARCHAR(100) PATH '$.kana3',
              zipcode VARCHAR(10) PATH '$.zipcode')
  ) as jt
  ORDER BY address3

《結果》

 

✔ 安全なクエリ中止(CANCEL QUERY)

このリリースでInterSystems SQL に実行中のステートメントを中止し、実行により使用されていたメモリや一時領域などを安全に開放する新しいコマンド CANCEL QUERY が追加されました。

 

クエリパフォーマンスを向上させる機能強化

  • グローバルイテレータでは、ObjectScriptを使用せずに、インデックスおよびデータマップを参照する処理の多くをカーネル内部モジュールで実行します。
  • Adaptive Parallel Execution (APE; アダプティブ並列実行) フレームワークでカラムナーストレージを含むクエリに初めて対応しました。APEでは個別の並列サブクエリをプリペアして実行するのではなく、メインクエリとして同じクエリキャッシュクラスを並列ワーカーコードとして生成します。

 

Embedded Python

✔ Pythonランタイムが選択可能に(Windowsを除く)

Linuxベースの環境限定となりますが、管理ポータルでPythonランタイムを指定できるようになりました。(ドキュメント:Flexible Python Runtime Feature

管理ポータル > [システム管理] > [構成] > [追加の設定] > [メモリ詳細] > [PythonRuntimeLibrary]

PythonRuntimeLibrary構成設定詳細(英語)

 

✔ BPLエディタ内でPythonの記述が可能に

Interoprabilityで使用するビジネス・プロセスのエディタの1つであるBPLエディタ内のCodeアクティビティにEmbedded Pythonが記述できるようになりました。

 

✔ Python WSGI標準準拠のWebアプリが作成可能に(実験的機能)

IRISのインスタンス内部でEmbedded Pythonを使用して flask や Django などの WSGI 準拠フレームワークを実行することができるようになりました。

(ドキュメント:Creating WSGI Applications

WSGIのWebアプリの実行を指定するために、管理ポータルの以下メニューや用意されました。

管理ポータル > [システム管理] > [セキュリティ] > [アプリケーション] > [ウェブ・アプリケーション]

図の設定では、http://Webサーバ/flaskapp が指定されるとFlaskで記述している flasktest アプリケーションが呼び出されます。

メモ:例では、パスを通過した後に付与されるアプリケーション・ロールを指定しています。本来であれば適切なロールを用意し付与しますが簡易的に試すためフルアクセスできる%Allを付与しています)

この例のWebサーバ(localhost:8080)に対してパスを指定すると以下の画面が表示されます。画面でID番号を入力すると、指定IDを条件にIRISにあるテーブルに対してSELECT文が実行されレコードの中身が表示されます。

以下ご参考(コード例):

 
Pythonのコード
 
使用しているHTML
2 Comments
讨论 (2)1
登录或注册以继续
文章
· 三月 25, 2024 阅读大约需 10 分钟

新しい FHIR サーバープロファイルベースのバリデーション

バージョン 2023.3(InterSystems IRIS for Health)の新機能は、FHIR プロファイル基準の検証を実行する機能です。

(*)

この記事では、この機能の基本的な概要を説明します。

FHIR が重要な場合は、この新機能を絶対にお試しになることをお勧めします。このままお読みください。

讨论 (0)0
登录或注册以继续
文章
· 三月 25, 2024 阅读大约需 7 分钟

A Peek at IRIS Data Platform Performance Strategies

In the business world, every second counts, and having high-performing applications is essential for streamlining our business processes. We understand the significance of crafting efficient algorithms, measurable through the big O notation.

Nevertheless, there are numerous strategies to boost the performance of systems built on the IRIS Data Platform. These strategies are equally crucial for optimizing overall efficiency.

Let's join the journey for a sneak peek into the tips for making IRIS Data Platform work better, where every little trick will help your applications shine.

1. Using Indexes

Indexing serves as a means to optimize queries by maintaining an organized subset of frequently requested data. Within the IRIS Data Platform, various index types cater to specific needs:

Standard Indexes: These are persistent arrays associating indexed values with the RowID(s) of the corresponding rows.

Example:

Index NameIDX ON Name;

Bitmap Indexes: A unique index type utilizing bitstrings to represent sets of RowID values corresponding to a given indexed value.

Example:

Index RegionIDX ON Region [Type = bitmap];

Bitslice Indexes: This special index allows rapid evaluation of specific expressions, such as sums and range conditions.

Example:

Index SalaryIDX ON Salary [Type = bitslice];

Columnar Indexes: Specifically designed for very fast queries, especially those involving filtering and aggregation operations, on columns with data stored across rows.

Example:

Index AmountIDX ON Amount [Type = columnar];

2. Query Plan

We want to ensure that our queries utilize defined indexes. However, sometimes they do not get executed as expected. For instance, if 'ColumnName IS NOT NULL' is used in the query's WHERE clause, even if an index is defined against ColumnName, it will skip the index. Therefore, it is not recommended to use 'ColumnName IS NOT NULL' if ColumnName has its index defined.  How can we determine if the query uses the index map or not? The Query Plan is the tool we can use to check if the query utilizes the index map or simply traverses the entire master map.

How to use query plan?

Run Show Plan either with the SQL EXPLAIN command or the Show Plan option in the Management Portal ->System Explore->SQL, then follow to the first map. If the first bullet item in the Query Plan is “Read master map”, or the Query Plan calls a module whose first bullet item is “Read master map”, the query first map is the master map rather than an index map. Because the master map reads the data itself, rather than an index to the data, this almost always indicates an inefficient Query Plan. Unless the table is relatively small, we should create an index so that when we rerun this query the Query Plan first map says “Read index map.”

3. Query Optimizer and Tune Table

When determining the optimal execution strategy for a given SQL query, the Query Optimizer takes into account three key factors:

  • ExtentSize: row count for each table used within the query.
  • Selectivity: the percentage of distinct values calculated for each column used by the query.
  • BlockCount: count for each SQL map used by the query.

These statistics can be specified in the persistent class storage definition.

To guarantee accurate decision-making by the Query Optimizer, it is crucial to set these values correctly.

  • We have the option to explicitly define any of these statistics when creating a class (table) before inserting data into the table.
  • Following the population of the table with representative data, we can utilize Tune Table to compute these statistics.
  • Subsequent to running Tune Table, we can replace a calculated statistic by specifying an explicit value.

We can assess the statistics we have explicitly defined against the results generated by Tune Table. If Tune Table's assumptions prove less than optimal for the Query Optimizer, choosing an explicitly set statistic over the one generated by Tune Table becomes a viable alternative.

What is Tune Table?

Tune Table is a utility designed to analyze the data within a table, providing insights into ExtentSize, the distribution of distinct values in each field, and the Average Field Size (average length of values in each field). Additionally, it computes the BlockCount for each SQL map. We have the option to instruct Tune Table to leverage this information for updating the metadata associated with a table and its fields. Subsequently, the query optimizer utilizes these statistics to determine the most efficient execution plan for a query.

It is recommended to run Tune Table on a table after populating it with a representative volume of actual data. Typically, running Tune Table once, as a final step in application development before the data goes live, is sufficient. In certain scenarios, IRIS automatically executes Tune Table the first time a SELECT query is performed on a table.

However, there are also manual ways to run Tune Table:

  • Using the Management Portal SQL interface Actions drop-down list.
  • Invoking the $SYSTEM.SQL.Stats.Table.GatherTableStats() Opens in a new tab method for a single table, or all tables in the current namespace.
  • Issuing the SQL command TUNE TABLE for a single table.

4. Columnar storage

In columnar storage, primary data is stored in one global per column. Sequences of 64,000 data elements are stored in separate global subscripts. Data is encoded using a vector encoding that is optimized for storing elements of the same data type. In general, analytical queries run quickly but transactions might be slower.

When shall we choose to use columnar storage to enhance the performance?

  • Filtering and aggregating data in specific columns to perform analytical queries (OLAP).
  • Data are not frequently updated, inserted, and deleted or data updated in bulk.

5. Avoiding frequently opening objects

Frequently opening objects can slow the application process down. Therefore, we should combine the opening of identical objects whenever possible and when it makes logical sense.

When we need to return an object property value, we can use ##(ClassName).PropertyGetStored(id). This built-in method is faster than using object.Property after opening an object by %OpenId().

6. Using Work Queue Manager

When there is a substantial process that needs to be completed, if certain parts of the process can run concurrently, it is advisable to consider a parallel processing system.

The Work Queue Manager allows us to enhance performance by programmatically distributing work to multiple concurrent processes.

How to use Work Queue Manager?

Set queue = $system.WorkMgr.Initialize("/multicompile=1",.status)
For i=1:1:100{
  Set status = queue.Queue("##class(ClassName).ClassMethod",i)
}
If status =1 Set status = queue.WaitForComplete()
If 'status {
  Do $system.Status.DisplayError(status)
}

7. Performance Monitoring Tools

There are a few of system monitoring tools available in the IRIS Data Platform. Here, we will take a quick look at ^%SYS.MONLBL and ^SystemPerformance.

^%SYS.MONLBL is a line-by-line monitor, providing a way to diagnose where time is spent executing selected code in routines. This utility allows us to monitor and identify which part of the code has a performance problem.

To start the monitor, use  

%SYS>Do ^%SYS.MONLBL

^SystemPerformance is a system snapshot tool for collecting detailed performance data about an IRIS Data Platform instance and the platform on which it is running. The resulting report can aid in diagnosing system problems and can be run in the terminal or in the Management Portal. By default, the output directory for the report is the install-dir\mgr directory of the IRIS instance.

To start the monitor, use  

%SYS>do ^SystemPerformance

To stop a running profile and abort the collected data, use

%SYS>do Stop^SystemPerformance(runid)

Alternatively, to stop the job without deleting log files and produce an HTML performance report from those log files, use

%SYS>do Stop^SystemPerformance(runid, 0)

8. Checking Performance by Counting Globals

We can utilize the following class method, which returns the number of global references made by a specified process: ##class(%SYSTEM.Process).GlobalReferences($JOB)

To achieve the performance monitoring purpose, we can run this class method at the beginning and the end of the process to check the amount of global accesses during this process being executed. The more globals being accessed, the slower the process would be.


Conclusion

As we conclude this journey, I hope you have found these insights valuable for enhancing your applications' performance. Feel free to implement these tips and witness the positive impact on your systems. For a deeper dive into these strategies and to uncover more valuable performance enhancement insights, explore our comprehensive online documentation. Thank you for joining on this exploration, and may your applications continue to thrive on the IRIS Data Platform.

 

More Performance Improvement Materials: (Thanks to @Vitaliy Serdtsev and @Benjamin De Boe )

10 Comments
讨论 (10)3
登录或注册以继续
InterSystems 官方
· 三月 25, 2024

Update for Health Connect users

Are you using HealthShare® Health Connect? You should know that starting with version 2024.1, a private web server (PWS) will no longer be included in installations.

 


It is recommended that you migrate to an external production-grade web server to ensure security. Benefits include:

  • Only one web server is needed for all your instances.
  • You can take charge of security by keeping your web server up to date—no need to wait for the next InterSystems release.

See how to migrate to an external web server (video series, 10m).

Learn more in this FAQ post in the Developer Community.

讨论 (0)1
登录或注册以继续
问题
· 三月 25, 2024

Suppression de fichier dans l'extensions Intersystems

Bonjour,

Je fais face a un problème assez embêtant,

Depuis un petit moment il ne m'est plus possible de supprimer des fichiers compilés et exportés dans Iris,

Normalement lorsque je vais dans l'extension InterSytems, j'ouvre mes classes dans mon namespace et lorsque je faisais clique droit > delete, les fichiers se supprimaient. Cependant, ce n'est plus le cas, lorsque je clique sur delete rien ne se passe

Quelqu'un saurait d'où vient le problème ?

Merci par avance

3 Comments
讨论 (3)2
登录或注册以继续