Skip to Content
avatar image
Former Member

Performance issue in CDHDR & CDPOS

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    Jun 10, 2011 at 02:50 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 10, 2011 at 04:02 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi John/Yuri,

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

      Thanks:

      Gaurav

  • Jun 10, 2011 at 06:21 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 14, 2011 at 10:22 AM

    Hi

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

    Regards

    Eduardo

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 29, 2011 at 07:51 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 29, 2011 at 10:25 AM

    Please check below thread

    [cdhdr-and-cdpos-tables-performance-issue;

    Add comment
    10|10000 characters needed characters exceeded