IBM Support

IT31791: FUNCTIONAL INDEX IS NOT USED BY A SELECT IN A STORED PRECEDURE

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • Consider a simple table using a functional index in a definition
    like this
    
    create table "informix".kokos  (a serial not null ,b
    varchar(40));
    
    create function "informix".uppc (a varchar (40)) returning
    varchar (40) with (not variant);
       return upper (a);
    end function;
    create index "informix".kokos_1 on "informix".kokos
    ("informix".uppc(b) ) using btree ;
    
    A simple standalone query like:
    
    select a,b,uppc (b) from kokos where uppc (b) like uppc
    ("Hqs%");
    
    ... will use the index, but the similar query in a stored
    procedure
    
    
    create procedure "informix".jojo1 (p_b varchar (40)) returning
    integer, varchar (40), varchar(40);
       define l_a integer;
       define l_b varchar (40);
       define l_ub varchar (40);
    
       foreach select a,b,uppc(b) into l_a,l_b,l_ub from kokos where
    uppc (b) like uppc (p_b)
          return l_a, l_b,l_ub with resume;
       end foreach
    end procedure;
    execute procedure jojo1 ("Hqs%");
    
    ... will not use the index, but can be forced by a directive.
    And then the statistics show inaccurately that the index is
    used, yet all rows in the table are scanned.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users of Informix Server prior to 12.10.xC15 and 14.10.xC4.  *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Informix Server 12.10.xC15 (when available) or    *
    * 14.10.xC4.                                                   *
    ****************************************************************
    

Problem conclusion

  • Fixed in Informix Server 12.10.xC15 and 14.10.xC4.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT31791

  • Reported component name

    INFORMIX SERVER

  • Reported component ID

    5725A3900

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-02-07

  • Closed date

    2020-12-10

  • Last modified date

    2020-12-10

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    INFORMIX SERVER

  • Fixed component ID

    5725A3900

Applicable component levels

[{"Line of Business":{"code":null,"label":null},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSGU8G","label":"Informix Servers"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"C10"}]

Document Information

Modified date:
11 December 2020