Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Sh To on 14.10.FC8 wanted to run a query once with no cached plan or statement cache. Art Kagel said SET STATEMENT CACHE OFF disables statement caching per session but not data caching. Since first-run timing was needed, he suggested running it twice or using onmode -B reset, which affects all sessions. No per-session way to avoid the cache exists.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Sh To — source: IBM Community (ConnectedCommunity.org) Informix forum
Hi everyone,
I'm using Informix 14.10.FC8 and I'd like to execute a query
just once
without it using any cached plan or statement cache - basically, I want it to be fully re‑parsed and re‑optimized for testing purposes.
Is there any supported way (per‑session or per‑statement) to run a query without using the cache, or to force a one‑time reoptimization without disabling caching globally?
Thanks in advance!
------------------------------
Sh To
------------------------------
↪ replying to Sh To
Art Kagel — source: IBM Community (ConnectedCommunity.org) Informix forum
You can disable the statement caching during any session, assuming that it is even active (most sites do not enable statement caching), with the SET STATEMENT CACHE OFF statement:
SET STATEMENT CACHE statement
Use the SET STATEMENT CACHE statement to turn on caching or turn off
caching for the current session. This statement is an extension to the ANSI/ISO
standard for SQL.
Syntax
►► SET STATEMENT CACHE
ON
►◄
OFF
You cannot disable data caching, however. but that will not effect the optimization of the statement, only its execution time after the first attempt.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
↪ replying to Art Kagel
Sh To — source: IBM Community (ConnectedCommunity.org) Informix forum
Thanks
In fact, we need the execution time to be like the first attempt.
------------------------------
Samuel To
------------------------------
↪ replying to Sh To
Art Kagel — source: IBM Community (ConnectedCommunity.org) Informix forum
The only thing you could do then, is:
a) Run it twice and use that second data cached timing for further testing, or
b) Use the "onmode -B reset" to flush and initialize the cache, but that will affect all sessions.
There is no way to set a session to not use the cache.
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
↪ replying to Art Kagel
Sh To — source: IBM Community (ConnectedCommunity.org) Informix forum
Thanks
------------------------------
Samuel To
------------------------------
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.