Skip to Content
author's profile photo Former Member
Former Member

Secondary Index + client field

I posted this already as an answer to another thema but since it is very important to me (and since there were some mistakes in my answer) now I make a new theme out of it:

When I look at non-unique secondary indizes in the data dictionary (Release 4.6c) I find that around two of three non-unique secondary Indizes of the standard SAP tables (I looked up by checking the tables dd03l, dd12l and dd17s) have the client field (rollname = mandt) as an entry, one third don't have the client field at all.

I wonder what could be the arguments using the client field in a secondary index or not.

Since we have performance problems in using huge data tables it would be very important for me to know if the usage of the client field as an index field brings more advantages or more disadvantages. We don't have any transactions where the "client specified" clause has to be used.

Kind regards Axel Kiltz

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 05, 2004 at 12:50 PM

    I can't quite determine if you know what the client field is. Do you know what it's used for?

    The only time you'd specify the client is if there's a need to access data in another client within the same database otherwise the client is always assumed to be the user's currently logged-on client anyway.

    Maybe this will help a bit.

    Excerpt from -->

    Viewed technically, each time a client-specific table is accessed, the database interface implies an additional selection of the active logon client, meaning that the WHERE clause is added to the SQL statement.

    "WHERE <client-field> = <login-client>".

    This substitution is made dynamically in the database interface at runtime.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I understand and agree with your logic but disagree with putting the client last.

      The answer is really to either put the client in as the first index field, or to leave it out altogether. The choice made will be specific to the needs of each installation and is dependent on the number of "real" clients in a system. Undoubtedly the client field will not be necessary in most production systems, where there is only one "real" client (excluding clients like 000 and 066).

      However, this must be considered against the impact to other systems (such as QA and Training) where there may be multiple clients as here the client field would be most useful as the first field of the index.

      It would be nice if we could define the index as including the client field for certain systems only...



      Message was edited by: Scott Barden

  • author's profile photo Former Member
    Former Member
    Posted on Mar 18, 2004 at 04:50 AM

    If you have single client no need to specify client field in the index .

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.