consideration for a new secondary index

IBM's hierarchical database management system with a Database Manager (IMS DB) and a Transaction Manager(IMS DC)

consideration for a new secondary index

Postby Ajay Baghel » Sun Jan 20, 2013 5:55 pm

Hi Friends,

I have a question on requirement w.r.t need for a new secondary index. The requirement is as below:

We have a root segment- Order segment - having key as "Order No". The other fields on the root segment are "customer-code", "order-date", and "ship-indicator" alongwith some other fields.

We need to display all the orders for a given "customer-code" (customer code is input by the user on the inquiry screen) on to the screen in sequence by "order-date" - order with the oldest date first. Only those orders should be displayed for which "order-date" < current-date AND for which "ship-indicator" field is blank.

The database already has secondary index on the root segment based on customer code.

However, since the requirement is to display the orders in sequence by "order-date", I am thinking of defining an index on "order-date" that should point to the root segment. Please let me know if I am correct in this approach.

Should I define:

(1) a single index on "Order-date". OR
(2) a single index on "Order-date" AND "ship-indicator".OR
(3) a single index on "Order-date" AND "ship-indicator AND cusotmer-code".

The order for fields in the index is as given above.

Please let me know your views/thoughts.

Ajay Baghel
Posts: 4
Joined: Sun Aug 17, 2008 8:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: consideration for a new secondary index

Postby NicC » Mon Jan 21, 2013 2:59 am

This is a double post - I was going to lock it but I see Enrico has done that to the other one.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Global moderator
Posts: 3026
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Return to IMS DB/DC


  • Related topics
    Last post