Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Performance issue in CDHDR & CDPOS

Former Member
0 Kudos

Hi,

I'm having the below QUERY on CDHDR which take a <bowdlerized> lot of time:

SELECT OBJECTCLAS

OBJECTID

CHANGENR

TCODE

UDATE

UTIME

INTO TABLE IT_CDHDR2

FROM CDHDR

WHERE OBJECTCLAS = C_OBJECT

AND OBJECTID = C_OBJECT

AND ( TCODE = C_TCODE1 OR

TCODE = C_TCODE2 ).

Then I've the other select query on CDPOS using for all entries on IT_CDHDR2. Both the queries are taking a lot of time.in the CDPOS select query I'm passing all the keys in order while I couldn't do that for CDHDR. Kindly advise if anyone has worked on the performance issues with CDHDR/CDPOS. What are all the possible ways of improving the performance of CDHDR / CDPOS.

Thanks:

Gaurav

Edited by: Rob Burbank on Jun 10, 2011 3:00 PM

7 REPLIES 7

Former Member
0 Kudos

G,

Ask your DBAs when was the last time that they ran "stats" on CDHDR and CDPOS.

Running stats optimizes performance when accessing a table.

yuri_ziryukin
Employee
Employee
0 Kudos

Hello Gaurav,

basically John was right.

Table CDHDR has first key fields MANDT, OBJECTCLAS, OBJECTID.

Object ID is normally selective enough to provide good performance for the select that you mentioned.

The only reason that comes to my mind is the outdated statistics.

When the database decides whether to make an index scan or a full table scan, it looks at the table statistics (number of rows, selectivity, etc.). Tables like CDHDR grow after GoLive of the system. If the statistics was last collected when this table was small, the database will think that it will be cheaper to do a full table scan. And it is not the case anymore.

Please go to the transaction DB20 and update statistics for CDHDR and CDPOS tables.

See if it helps.

Regards,

Yuri

0 Kudos

Hi John/Yuri,

I'll just check on that & update you on this. Thanks for your response.

Thanks:

Gaurav

former_member206439
Contributor
0 Kudos

Hi Gaurav,

Please check the FM - CHANGEDOCUMENT_READ_HEADERS

You can read the document of this FM also.

For CDPOS

The FM - CHANGEDOCUMENT_READ_POSITIONS

Read the documenatation.

It may help the performance.

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

See the report RSSCD100. It isn't slow. It will give ideas how to solve it.

Regards

Eduardo

Former Member
0 Kudos

Hi,

Try Naresh Nelapatla's answer. I had same issue some time back and tried those FM and performance was good compared to direct fetch.

Thanks,

Jagadish

murtuza_chhatariya
Active Participant
0 Kudos

Please check below thread

[;