新しい投稿

検索

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
質問
· 2026年1月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
ディスカッション (6)2
続けるにはログインするか新規登録を行ってください
ダイジェスト
· 2026年1月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
お知らせ
· 2026年1月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
ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
質問
· 2026年1月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
ディスカッション (5)3
続けるにはログインするか新規登録を行ってください