Nouvelle publication

Rechercher

Question
· Jan 7

How does Cache handle client-side query timeouts (ODBC / SQL Server linked server)?

Hello,

We are accessing an InterSystems Cacha database from Microsoft SQL Server using a linked server over ODBC (ODBC35). Queries are executed using OPENQUERY.

On the SQL Server side, there is a linked server property called Query Timeout. By default it is set to 0 (no timeout). We are considering setting it to 15 seconds and would like to understand how Cache behaves in this scenario.

Specifically, I would like clarification on the following points:

  1. When SQL Server sets a query timeout (for example, 15 seconds), is this timeout visible to or enforced by Cache itself, or is it handled entirely on the client/ODBC driver side?
  2. Does the Cache ODBC driver honor the ODBC attribute?
    • Is the timeout enforced during query execution?
    • Or only during row fetching?
    • Or not enforced at all?
  3. If SQL Server times out and cancels the request:
    • Does Caché stop executing the query immediately?
    • Or can the query continue running on the Caché server in the background?
6 Comments
Discussion (6)1
Connectez-vous ou inscrivez-vous pour continuer
Résumé
· Jan 7

Newsletter annuelle de la communauté Intersystems de 2025

Bonjour et bienvenue à la newsletter annuelle de la communauté des développeurs de 2025.
Statistiques générales:
✓ Publications 264 publiées le 2025 :
 147 articles
 109 annonces
 8 questions
28 membres ont rejoint la communauté des développeurs en 2025
1,337 publications au total depuis le début
194 membres ont rejoint au total depuis le début
Les plus populaires
Les plus discutés
2
Par Corentin Blondeau
1
Par Liam Evans
1
Par Iryna Mykhailova
Les plus aimés
Auteurs les plus populaires
Auteurs avec le plus d'articles
Aperçu de 2025Communauté des développeurs d'InterSystems
Annonce
· Jan 7

Récapitulation annuelle de la communauté des développeurs de 2025

Bonjour et bienvenue à la récapitulation annuelle de la communauté des développeurs de 2025.
Statistiques générales:
✓ Publications 264 publiées le 2025 :
 147 articles
 109 annonces
 8 questions
28 membres ont rejoint la communauté des développeurs en 2025
1,337 publications au total depuis le début
194 membres ont rejoint au total depuis le début
Les plus populaires
Les plus discutés
2
Par Corentin Blondeau
1
Par Liam Evans
1
Par Iryna Mykhailova
Les plus aimés
Auteurs les plus populaires
Auteurs avec le plus d'articles
Aperçu de 2025Communauté des développeurs d'InterSystems
Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer
Question
· Jan 7

Optimizing performance of production using Pool Size>1

Hi Everyone!

We have an existing process (running in FIFO order), all business hosts having pool size=1.

Currently we are reading records from a file (one record at a time) then that record goes to business process for further processing and finally through the business operation. As of now we are using synchronous call in our existing code. Before processing the last record we are using hang of 50 seconds because we need to initiate a batch once the processing of last record is finished.

This process is taking too much time for a file having 0.1 million records (max records in a file).

  
Now we want to increase the performance of this process, so that processing can be faster by modifying the synchronous call with asynchronous call and removing the hang for last record. 

While modifying the code, we have met with a condition which counts the processed records and save it in a class using below code

&sql (Select ID into :RowID from Data.A where MetadataID=:MetadataID)

set obj=##class(Data.A).%OpenId(RowID)

set obj.ProcessedCount=obj.ProcessedCount + 1

When the pool size=1, the count was updating correctly but when I tested with pool size=2 or pool size=5, the counts are not getting updated correctly.

I further tried using SQL update but no luck & even tried with %NOLOCK condition if SQLCODE'=0 but that is also not working.

&sql(Update Data.A set ProcessedCount = ProcessedCount + 1 Where ID =:RowID)
if SQLCODE'=0 {
    &sql(Update Data.A set ProcessedCount = ProcessedCount + 1 Where ID =:RowID)
}    

I believe we cannot use a lock condition before updating ProcessedCount, because it will again process them one by one taking the similar amount of time even with pool size >1

What can be the ideal solution for this issue. Please suggest.

Thanks in advance

5 Comments
Discussion (5)3
Connectez-vous ou inscrivez-vous pour continuer
Résumé
· Jan 6

Boletim Anual do InterSystems Community de 2025

Olá e boas-vindas ao Boletim Anual do Developer Community de 2025 .
Estatísticas gerais:
278 postagens publicadas em 2025:
 162 artigos
 96 anúncios
 17 perguntas
 3 discussões
42 membros ingressaram no Developer Community em 2025
✓ Total de 1,544 posts publicadas ao todo
✓ Total de 21,462 membros ingressaram ao todo
Mais populares:
84
Por Julio Esquerdo
64
Por Andre Larsen Barbosa
Mais discutidos
Mais curtidos
Autores mais populares
Autores com mais artigos
!resumo do anoComunidade de desenvolvedores da InterSystems