cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Adding indexes on DB

0 Likes
1,178

Hello expert,

I am trying to find information some useful information on how to add indexes on the SAP Commerce database tables.

I have checked https://www.sap.com/cxworks/expert-recommendations/articles/commerce and could not find best practices on this topic.

Thank you for your help in advance.

Accepted Solutions (1)

Accepted Solutions (1)

pavan_joshi1
Participant

Hello,

You can use the <indexes> tag in the item type definitions in *-items.xml to create such SAP commerce DB indexes, whatever DB dialect it is pointing to. Refer below.

      <itemtype code="<ITEMTYPENAME>"
                  ...>
            <deployment table="TYPEDBNAME" typecode="TYPECODE"/>
            <attributes />
            <indexes>
                <index name="UID" unique="false">
                    <key attribute="uid"/>
                </index>               
            </indexes>
      </itemtype>

On update, any of these changes will be done.
You can go back and see indexes created in your DB.

Thanks! I hope you expected the same.

Answers (0)