Skip to Main Content
IBM Data and AI Ideas Portal for Customers


This portal is to open public enhancement requests against products and services offered by the IBM Data & AI organization. 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

Post ideas and requests to enhance a product or service. Take a look at ideas others have posted and upvote them if they matter to you,

  1. Post an idea

  2. Upvote ideas that matter most to you

  3. Get feedback from the IBM team to refine your idea


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.

IBM Employees should enter Ideas at https://ideas.ibm.com


Status Not under consideration
Workspace Db2
Components Other/Unknown
Created by Guest
Created on May 8, 2019

Add options for "recommend indexes" and "evaluate indexes" explain types to explain_from_section

When running explains from jupyter notebook, I prefer to use EXPLAIN_FROM_SECTION. However for in-depth analysis of indexes, I need the RECOMMEND INDEXES and EVALUATE INDEXES explain modes. These don't seem to exist for EXPLAIN_FROM_SECTION. This means that I must have a full Db2 client installed and properly sourced on my client, instead of just working through the drivers.

Needed by Date May 1, 2019
  • Guest
    Reply
    |
    Jul 10, 2019

    Hi Ember,

    (For some reason I don't see your reply in this Idea, although I received a copy of it in my notifications. )

    I'm not that familar with the Python support for Db2 but the problem with the parameter markers might be because Python is trying to bind in a value, which is only necessary if the statement is actually executed, which shouldn't be the case when EXPLAIN MODE is RECOMMEND INDEXES. Does Python have support for preparing a statement or declaring a cursor? If so, that might avoid the issue. It works in CLP. i.e. "declare c1 cursor for select..." will result in index recommendations but the query is not executed until the cursor is opened.

    Replacing the parameter marker with a literal could result in different index recommendations because the optimizer can compare the literal to the statistics to get a better filtering estimate. There are other optimizations possible such as introducing predicates implied via transitivity e.g. c1=1, c2=1 --> c1=c2.

  • Guest
    Reply
    |
    Jul 10, 2019

    Hi Ember,

    Can you provide more details about why the RECOMMEND INDEXES and EVALUATE INDEXES explain modes are difficult to use from a Jupyter notebook and why using them would require the full Db2 client to be installed?

    Supporting these explain modes with EXPLAIN_FROM_SECTION doesn't make sense architecturally because they require invoking the optimizer and that doesn't happen with EXPLAIN_FROM_SECTION. EXPLAIN_FROM_SECTION extracts explain information that is stored along with the access section and writes it to the explain tables. The SQL compiler and optimizer aren't called during this process. In order to support these index explain modes, the index recommendations would need to occur for every statement compilation and the resulting information would need to be stored along with the access section. This would increase prepare time and the size of access sections. I might be able to suggest an alternative way to accomplish what you want if I understand your use case better.