Skip to Main Content
IBM Sterling


This portal is to open public enhancement requests for IBM Sterling products and services. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Submitted
Categories Performance
Created by Guest
Created on Dec 22, 2025

Performance optimization of critical functions SQL queries

As query.getStateAndStatus_MAIN* is used to know the state and state of BP across different workflows which is common use case for many clients across the industry. On a high volume application environment this query is taking more than 10+ mins and causing database CPU increase and impacting overall processing time.

Oracle vendor recommended to optimize this query.  

Similar to above, below is another query which is captured in AWR report each time during application slowness.

SELECT MSG.MESSAGE_NAME AS MESSAGENAME, MSG.MESSAGE_ID, CREATED_DATETIME, MESSAGE_SIZE, MSG.CONTENT_TYPE , EXTRACTABLE_UNTIL, 0 AS EXTRACTABLE_COUNT, 0 AS EXTRACTABLE, 2 AS EXTRACT_TYPE FROM MBX_MESSAGE MSG, MBX_MAILBOX MBX, DOCUMENT, MBX_EXTRACT_TIL TIL WHERE MSG.MAILBOX_ID = MBX.MAILBOX_ID AND MSG.DOC_ID = DOCUMENT.DOC_ID AND (MBX.PATH = :1 )AND MSG.MESSAGE_NAME_UP LIKE :2 AND MSG.MESSAGE_ID = TIL.MESSAGE_ID UNION ALL SELECT MSG.MESSAGE_NAME AS MESSAGENAME, MSG.MESSAGE_ID, CREATED_DATETIME, MESSAGE_SIZE, MSG.CONTENT_TYPE , TO_DATE ('1900-01-01', 'YYYY-MM-DD') AS EXTRACTABLE_UNTIL, EXTRACTABLE_COUNT, 0 AS EXTRACTABLE, 0 AS EXTRACT_TYPE FROM MBX_MESSAGE MSG, MBX_MAILBOX MBX, DOCUMENT, MBX_EXTRACT_COUNT CNT WHERE MSG.MAILBOX_ID = MBX.MAILBOX_ID AND MSG.DOC_ID = DOCUMENT.DOC_ID AND (MBX.PATH = :3 )AND MSG.MESSAGE_NAME_UP LIKE :4 AND MSG.MESSAGE_ID = CNT.MESSAGE_ID UNION ALL SELECT MSG.MESSAGE_NAME AS MESSAGENAME, MSG.MESSAGE_ID, CREATED_DATETIME, MESSAGE_SIZE, MSG.CONTENT_TYPE , TO_DATE ('1900-01-01', 'YYYY-MM-DD') AS EXTRACTABLE_UNTIL, 0 AS EXTRACTABLE_COUNT, EXTRACTABLE, 1 AS EXTRACT_TYPE FROM MBX_MESSAGE MSG, MBX_MAILBOX MBX, DOCUMENT, MBX_EXTRACTABLE EXT WHERE MSG.MAILBOX_ID = MBX.MAILBOX_ID AND MSG.DOC_ID = DOCUMENT.DOC_ID AND (MBX.PATH = :5 )AND MSG.MESSAGE_NAME_UP LIKE :6 AND MSG.MESSAGE_ID = EXT.MESSAGE_ID

Please help to optimize these queries which will in turn help lot of Sterling B2B users and improve application stability.