Question
· Oct 11, 2025

How do I build a custom cost-based query optimizer rule in IRIS SQL engine?

Can the IRIS SQL engine be extended with custom optimization rules (e.g., prioritizing certain indices or join orders)? If not, is there a supported way to influence cost models?

Discussion (1)1
Log in or sign up to continue

You cannot change the priority of indices.

You can ask IRIS to ignore particular index -- %IGNOREINDEX, or disable index for a particular condition -- %NOINDEX

You can force join order with %INORDER hint

https://docs.intersystems.com/iris20253/csp/docbook/DocBook.UI.Page.cls?...

Generally, if you see that some query does not use particular index, that should be used, or chooses bad join order -- collect table statistics, if this does not help -- contact InterSystems Support (WRC), or post details here -- the query, its plan, and describe what plan you'd like to see