Hi Mark,
Perhaps disabling the models will help.
Simplify Query Performance Tuning with the Db2 AI Query Optimizer - International Db2 Users Group
There are two ways to disable a model. One way is by providing the name of the model to disable,
and the second way is to use the name of the associated table. For example, here are the two ways to disable the model for the EMPLOYEE table:
ALTER MODEL SYSIBM.SQL241021170053621900 DISABLE;
ALTER MODEL ON SAMPLE.EMPLOYEE DISABLE;
Of course, in order to use ALTER MODEL, the model must already exist, so disabling the model in this way is a measure that can be useful in situations where an existing model needs to stop being used for all queries that involve the associated table.
You can see which models are enabled and disabled by running the following query on the SYSCAT.AIOPT_TABLECARDMODELS catalog view:
SELECT
VARCHAR(MODELSCHEMA, 25) AS MODELSCHEMA,
VARCHAR(MODELNAME, 25) AS MODELNAME,
VARCHAR(TABSCHEMA, 25) AS TABSCHEMA,
VARCHAR(TABNAME, 25) AS TABNAME,
ISENABLED
FROM
SYSCAT.AIOPT_TABLECARDMODELS
WHERE
TABSCHEMA = 'SAMPLE' AND
TABNAME IN ('EMPLOYEE', 'PROJECT');
The ISENABLED column is 0 when the model is disabled and 1 when the model is enabled:
To re-enable the model, the same DDL statements can be executed above by replacing the DISABLE clause with ENABLE:
ALTER MODEL SYSIBM.SQL241021170053621900 ENABLE;
ALTER MODEL ON SAMPLE.EMPLOYEE ENABLE;
Best regards, Joachim
------------------------------
Joachim Müller
------------------------------
Original Message:
Sent: Wed January 28, 2026 08:32 AM
From: Mark Gillis
Subject: Webinar: Experience the Power and Simplicity of the AI Query Optimizer in Db2 12.1.3
Hi
I asked a question yesterday about quantifying the results of the AI Optimiser. I thought that I could do some comparative examination of the access paths by switching off the AI optimiser but it looks as if I have misinterpreted the options. What I am doing is
- extracting the contents of the package cache using
db2advis -d dbname -q schema -g -p –noxml - executing db2exfmt against the extracted workload using
db2exfmt -d dbname -g TIC -w 2026-01-28% -n % -s % -# 0 -o Workload_2026-01-28_AIOPT_on.db2exfmt - looking in that output I can see many references to "Table Cardinality Model Predicates:"
- I then try and switch off the AI Optimiser using
UPDATE DATABASE CONFIGURATION FOR AWSSIT USING AUTO_AI_OPTIMIZER OFF;
UPDATE DATABASE CONFIGURATION FOR AWSSIT USING AUTO_MODEL_DISCOVER OFF; - and re-run the db2exfmt command
However, there are still references to the Table Cardinality Model Predicates so the existing models are still being evaluated.
How should I 'switch off' the use of the existing AI models in order to do this comparative check on traditional and AI cardinality evaluation?
Regards
Mark Gillis
------------------------------
Mark Gillis
Principal Consultant
Triton Consulting
Original Message:
Sent: Mon January 26, 2026 12:26 PM
From: Db2 Community Admin
Subject: Webinar: Experience the Power and Simplicity of the AI Query Optimizer in Db2 12.1.3
Join us for an insightful discussion on 27 January, 2025 at 11:00 AM ET.
This webinar presents IBM Db2's latest advancement in AI-powered
query optimization, introducing AI powered join cardinality estimation,
new in version 12.1.3. Building upon the Single Table Cardinality Model
released in Db2 12.1, this enhancement addresses critical limitations in
traditional join cardinality estimation by leveraging machine learning to
understand complex relationships between local and join predicates
across tables.
Key features and benefits include:
- Reliable performance: some queries execute up to 10 times
faster
- Minimal Resource Consumption: reuse of existing models so that
no new models required
- Automation: reduces query tuning and eliminates the need for
statistical views
In this webinar we will discuss in detail:
- The importance and challenges of cardinality estimation
- How Db2 uses neural networks to improve join cardinality
estimation
- Our internal performance test results on TPC-DS and SAP BW
workloads
- How better cardinality estimates, result in improved access plans
and superior performance without any tuning required.
Click here to register and add the event to your calendar.
Where is the link to join? Check your email the day before the event!
How to get the most out of this webinar:
Explore the Db2 Community.
Ask questions for the presenters by replying to this discussion post before, during and after the webinar. Lori Strain, Nick Ostan, and Lakshmi Tirunelveli Radhakrishnan will be happy to answer your questions and share insights.
Check out upcoming Db2 events here.
We look forward to seeing you there!
------------------------------
Db2 Community Admin
------------------------------