查找

Question
· Août 14, 2024

Iterating ^$GLOBAL is very slow

I use the following code to loop trough all globals : 

set name=""
for
{
   set name=$order(^$GLOBAL(name))
   quit:name=""
   write name,!
}

However this is really slow : about 1second per node. 

I ran debugger, and it seems most of the time is spend in "%SYS.GD Visible" function. There is a comment that says : 
"Sees if globals in dataset are visible to our namespace"
This function loop on a global named  ^mtemp which contains lot of records (10K or more).
I have cleared global, hoping it has been filled by another process but it's not (it seems to be filled by %SYS.GD)

Why is it so slow, Is there a way to make this faster ?

5 Comments
Discussion (5)3
Connectez-vous ou inscrivez-vous pour continuer
Article
· Août 13, 2024 17m de lecture

VIP dans le cadre de GCP

Si vous exécutez IRIS dans une configuration miroir pour HA dans GCP, la question de la fourniture de Mirror VIP (adresse IP virtuelle) devient pertinente. L'adresse IP virtuel permet aux systèmes en aval d'interagir avec IRIS en utilisant une seule adresse IP. Même en cas de basculement, les systèmes en aval peuvent se reconnecter à la même adresse IP et continuer à fonctionner.

Le principal problème, lors du déploiement sur GCP, est qu'un VIP IRIS doit être essentiellement un administrateur de réseau, conformément aux docs.

Pour obtenir l'HA, les membres du miroir IRIS doivent être déployés dans différentes zones de disponibilité d'un sous-réseau (ce qui est possible dans GCP car les sous-réseaux couvrent toujours toute la région). L'une des solutions pourrait être les équilibreurs de charge, mais ils coûtent bien sûr plus cher et nécessitent d'être administrés.

Dans cet article, j'aimerais fournir un moyen de configurer un VIP miroir sans utiliser les équilibreurs de charge suggérés dans la plupart des autres architectures de référence GCP.

2 Comments
Discussion (2)0
Connectez-vous ou inscrivez-vous pour continuer
Question
· Août 12, 2024

Error consultando foreign table en MySQL

¡Hola estimados miembros de la comunidad!

En esta ocasión no vengo con ningún artículo sino con un problema que me he encontrado al definir una conexión a una tabla ubicada en una base de datos externa en MySQL.

Estoy haciendo algunas pruebas con la funcionalidad de las Foreign Tables incluidas en IRIS que permite incluir tablas externas en modo consulta como si fueran propias de IRIS y he visto que funciona perfectamente con una tabla ubicada en PostgreSQL, el problema ha sido al intentar hacer lo mismo con una tabla de MySQL, he seguido los siguiente pasos como indica la documentación:

  • Paso 1: He creado la conexión a la base de datos de MySQL desde la configuración de SQL Gateway connection: **AVISO** si el nombre del fichero que contiene el driver es demasiado largo IRIS no podrá cargarlo.
  • Paso 2: He creado el Foreign Server:
    CREATE FOREIGN SERVER Test.MySQLDB FOREIGN DATA WRAPPER JDBC CONNECTION 'MySQL'
  • Paso 3: He creado la Foreign Table:
    CREATE FOREIGN TABLE Test.PatientMySQL SERVER Test.MySQLDB TABLE 'patient'
  • Paso 4: He lanzado al consulta a Test.PatientMySQL:
    SELECT * FROM Test.PatientMySQL

Y este ha sido el error:

[SQLCODE: <-230>:<Foreign table query Execute() failed>]

[%msg: <Foreign Tables - ERROR #8104: Gateway Exception: <GATEWAY> java.sql.SQLSyntaxErrorException com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:112) Remote database reported error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"patient" T1' at line 1>]

Como podéis ver, el problema son las dobles comillas que aparecen en el nombre de la tabla en la consulta que IRIS está ejecutando, MySQL es incapaz de reconocerlo y nos devuelve ese error. Por si acaso he revisado la versión de MySQL y el driver utilizado y ambas son la versión 9, así que no parece que sea eso.

¿Es un bug para MySQL? ¿He configurado algo erroneamente?

¡Gracias por adelantado!

1 Comment
Discussion (1)1
Connectez-vous ou inscrivez-vous pour continuer
Question
· Août 12, 2024

Error querying foreign table on MySQL

Hi community members!

I'm testing some functionalities about Foreign Tables and it works smoothly with PostgreSQL database, but I found out an issue with MySQL database, I followed the documentation:

  • Step 1: I've created my SQL Gateway connection to my MySQL database: **WARNING** if the name of the driver file is too long IRIS won't be able to get it.

  • Step 2: Create foreign server:
    CREATE FOREIGN SERVER Test.MySQLDB FOREIGN DATA WRAPPER JDBC CONNECTION 'MySQL'
  • Step 3: Create foreign table:
    CREATE FOREIGN TABLE Test.PatientMySQL SERVER Test.MySQLDB TABLE 'patient'
  • Step 4: Query Test.PatientMySQL:
    SELECT * FROM Test.PatientMySQL

And this is the error:

[SQLCODE: <-230>:<Foreign table query Execute() failed>]

[%msg: <Foreign Tables - ERROR #8104: Gateway Exception: <GATEWAY> java.sql.SQLSyntaxErrorException com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:112) Remote database reported error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"patient" T1' at line 1>]

As you can see, the problem is the double quotation used on the query for the table name that IRIS is executing, MySQL doesn't recognize it and throws the error, I've checked the driver and the MySQL versions and they match, version 9.

Is this a bug? Is it a misconfiguration?

Thank you in advance!

4 Comments
Discussion (4)1
Connectez-vous ou inscrivez-vous pour continuer
Question
· Août 8, 2024

Cold Backup via Batchfile on Windows Server

Hey,

since our instance of iris is just utilized during working hours, I would like to simply copy all data via FTP from the server to a NAS during the night.

Are there reasons against this approach?

Are there batch examples of how to stop and start the database?

 

Thank you in advance!

Erik

3 Comments
Discussion (3)1
Connectez-vous ou inscrivez-vous pour continuer