Skip to Content
0

Performance Issue : Incosistent behaviour after secondary index creation in different environments

Nov 27, 2017 at 06:24 AM

93

avatar image

Hi ,

We have created secondary index ‘on database tables A952, A954 and A955 in Dev environment and transported secondary indexes to STG1 and STG2 environments respectively with fields MANDT,KAPPL and MATNR.

The behavior of STG1 and STG2 environment to fetch data from db tables A952, A954 and A955(using select statement) is inconsistent after rebuilding and updating statistics of the newly created secondary index Z02.

SAP STG1 Environment:

Table A954, A952: Select statement is consuming least time to fetch data from these two tables and is picking the Z02 index

Table A955: Select statement is consuming time and doing a full scan.

SAP STG2 Environment:

Table A954: Select statement is consuming least time to fetch data from these two tables is picking the Z02 index

Table A955, A952: Select statement is consuming time and doing a full scan.

I have even used %Hints statement on the tables which are time consuming but without any luck.

Am I missing anything here. Appreciate your inputs to resolve this issue.

Thanks in advance.

-Always Learner

10 |10000 characters needed characters left characters exceeded

Do they have the same data? Are there other secondary indices?

0

Thanks for your comment. yes they have same data. These tables have 1 more index.

0
Former Member

Do you have make a SQL trace (ST05) and used the Explain to check witch index is used without %HINTS ? and the evaluation of the cost by SAP ?

0

Hi Frederic,

The below is the execution plan without hints. I am able to see the execution plan from ST04 unable to capture this in St05 trace due to timeout issue.

capture.jpg (44.0 kB)
0
Former Member
Always Learner

Your index is used and not seems to be so huge

Did you use a FOR ALL ENTRIES in your code ?

0

Thanks Frederic. Yes I used for all entries in my code. Sorted and deleted duplicate entries from internal table before using it in FOR ALL entries.

0

I tried, deleting the secondary index and re-transported it. It is still not working. Your inputs will be highly appreciated.

*comment edited

0

Hi ,

We went ahead and moved the secondary indexes to production system as there was no risk involved.

The secondary indexes worked in production :-). I am keeping this thread as open since I haven't found RCA.

I am still working to find the possible root cause and will update here accordingly.

I am requesting SCN folks to share their inputs.

Thanks

-Learner

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Raymond Giuseppi
Nov 28, 2017 at 10:44 AM
0
  • Could you check technical settings for those tables in the various system, look for buffering parameters?
  • Did you create the index without client field?
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Raymond,

Thannks for your reply.

  1. Technical settings are same for these tables across systems. Buffering Switched On and buffering type is fully buffered.
  2. Created index with MANDT field.
0