Pesquisar

Artigo
· Set. 25 2min de leitura

About parallel queries (%PARALLEL)

InterSystems FAQ rubric

One way to optimize query performance is to use query parallelism on a per-query or system-wide basis (a standard feature).

This is a technique for dividing the execution of a particular query among processors on a multi-processor system. The query optimizer will execute parallel processing only if there is a possibility of benefiting from parallel processing. Parallel processing is only applicable to SELECT statements.

Note that the number of parallel processes cannot be specified, as it is automatically adjusted according to the number of CPUs. You can check the current number of processors in your system with the following command.

USER>write $SYSTEM.Util.NumberOfCPUs()
8

Previously, parallel processing was enabled by adding the %PARALLEL keyword to a query, but from IRIS2019.1 onwards, the default is "always enabled".

Management Portal:
  System Administration > Configuration > SQL and Object Settings > SQL
    Execute queries in a single process
    *Check this box to disable parallel processing (default is unchecked)

To disable parallelism on a per-query basis, specify the %NOPARALLEL keyword.

SELECT * FROM %NOPARALLEL Sample.Person WHERE ...

Note:
Specifying %PARALLEL may degrade performance for some queries. For example, specifying %PARALLEL when executing a query on a system with multiple concurrent users may result in overall performance degradation. In this case, use %NOPARALLEL to disable parallel processing for each query, or set the system-wide setting to "Execute queries in a single process."

For more information, see the following document: Query Parallelism
 

Discussão (0)0
Entre ou crie uma conta para continuar
Artigo
· Set. 25 2min de leitura

Create a JDBC connection with Mysql Cache

When we need to integrate Caché/IRIS with other relational databases, one common question arises: “How do I set up the JDBC connection?”.
The official documentation doesn’t always provide a straightforward step-by-step guide, which can be frustrating, especially for beginners.

In this article, I’ll walk you through the entire process of configuring a JDBC connection with MySQL, from downloading the connector to linking tables in Caché/IRIS.

Note: JDBC connections in Caché/IRIS have some limitations, especially regarding caching and the use of ResultSet. In many cases, you may need to adapt queries manually and use the Gateway object to handle advanced scenarios.

1. Download the MySQL JDBC Connector

The first step is to download the official MySQL JDBC driver.
Go to: https://dev.mysql.com/downloads/connector/j/

2. Make the Connector Accessible

After downloading:

  1. Extract the package.
  2. Locate the .jar file (e.g., mysql-connector-j-9.4.xx.jar).
  3. Copy the file to a folder accessible to Caché/IRIS, for example:


3. Configure the Connection in the Management Portal

Now, let’s set up the connection inside the Management Portal:

  1. Open the Caché/IRIS Management Portal in your browser.
  2. Navigate to Gateway Sql Connections
  3. Click “Create New Connection”.




Create a new connection and configure it using the example provided.

,

4. Link External Tables

  • Go to a SQL in Menu, assistant > link table
  • Click Assistant > Link Table.
  • Select your connection (MySQL_Conn).
  • Choose the tables you want to link.
  • Confirm.

And put the necessary settings, this part is easy and very suggestive, once this is done your jdbc connection is ready, you can see on the sql screen itself the bank, the table and can bring the data, remember that mysql uses backquotes to form select and the cache uses double quotes which can be a problem when doing some select

After mapping the tables, you will be able to view them under the Tables tab in the SQL screen.

5. SQL Syntax Consderations

One common issue:

  • MySQL uses backticks (`) for table and column names.
  • Caché/IRIS uses double quotes (") for identifiers.
  • By selecting the appropriate options in the Gateway configuration screen (as shown in the screenshot), you can resolve this issue. However, you may also choose to leave it unchanged for any reason.

This can cause problems in queries. If needed, manually adjust the syntax when writing SQL statements.

Conclusion

And that’s it! You now have a working JDBC connection between Caché/IRIS and MySQL.

With this setup, you can:

  • Query MySQL data directly from Caché/IRIS.
  • Link tables to your namespace for easy integration.
  • Automate data exchange between systems.

Even though JDBC in Caché/IRIS has some limitations, this configuration covers most integration needs in a practical way.

1 Comment
Discussão (1)2
Entre ou crie uma conta para continuar
Discussão (0)2
Entre ou crie uma conta para continuar
Anúncio
· Set. 25

Queda una semana para el webinar "De los datos al conocimiento: Sacando provecho a la Información Clínica con InterSystems e IA"

¡Hola a todos!

Ya solo queda una semana para este webinar... ¡y tú sin registrarte! Pero tranquilo, aún estás a tiempo. 

 Recordamos ¿cuándo era? Jueves 02 de octubre, a las 4:00 PM (CEST). 

¿De qué trata? En esta sesión exploraremos cómo un AI Assistant, puede transformar la manera en que los profesionales de la salud acceden y comprenden la información clínica de sus pacientes. A través de ejemplos prácticos, veremos cómo el asistente permite generar resúmenes inteligentes de la historia clínica. 

El valor de esta solución radica en su capacidad de procesar grandes volúmenes de datos clínicos distribuidos en el tiempo: en el caso de un paciente con 20 años de historial clínico, distribuido en distintos establecimientos de salud, el asistente nos ayuda a condensar la información en un panorama claro y útil para la toma de decisiones. Gracias a la inteligencia artificial, los equipos clínicos pueden ahorrar tiempo, reducir la complejidad y centrar sus esfuerzos en brindar una atención más precisa y humanizada.

🗣 PonenteRodrigo Barahona, Sales Engineer en InterSystems Chile

➡️ Registro >>

Discussão (0)1
Entre ou crie uma conta para continuar
Artigo
· Set. 25 8min de leitura

ChatGPT を使って JSON レスポンスから ObjectScript クラスを生成する

REST レスポンスから IRIS データーベースに情報を保存する新しいプロジェクトがあります。 少なくとも 20 以上の個別の REST エンドポイントの情報を同期する必要があるため、それらのエンドポイントの結果を保存するために、ほぼ同じ数の ObjectScript クラスを作成しなければなりません。

ChatGPT を使って、それらのクラスを作成することはできますか? 答えは「できます」です。生成 AI を使って便利なものを作るのは初めてなので、素晴らしい機会だと思います。 スープを飲むキリンの写真を生成するのには飽きてきました…。

Discussão (0)0
Entre ou crie uma conta para continuar