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: 

CDHDR table query taking long time

former_member667836
Active Participant
0 Kudos

Hi all,

Select query from CDHDR table is taking long time,in where condition i am giving OBJECTCLASS = 'MAT_FULL' udate = sy-datum and langu = 'EN'.

any suggestion to improve the performance.i want to select all the article which got changed on current date

regards

shibu

1 ACCEPTED SOLUTION

ThomasZloch
Active Contributor
0 Kudos

This will always be slow for large data volumes, since CDHDR is designed for quick access by object ID (in this case material number), not by date.

I'm afraid you would need to introduce a secondary index on OBJECTCLAS and UDATE, if that query is crucial enough to warrant the additional disk space and processing time taken by the new index.

Greetings

Thomas

5 REPLIES 5

former_member195383
Active Contributor
0 Kudos

Hi..

please make sure that u are not using select * , and are selcting only those fields which are required...That may be one reason of the select query taking longtime..U can paste the select query so that we can get a clearer picture...

Regards

Rudra

ThomasZloch
Active Contributor
0 Kudos

This will always be slow for large data volumes, since CDHDR is designed for quick access by object ID (in this case material number), not by date.

I'm afraid you would need to introduce a secondary index on OBJECTCLAS and UDATE, if that query is crucial enough to warrant the additional disk space and processing time taken by the new index.

Greetings

Thomas

Former Member
0 Kudos

Hello

1. Use your query in LOOP...ENDLOOP with OBJECTID field.

2. Make a secondary index.

alison_lloyd
Active Participant
0 Kudos

Have you got a range of objectids you could use?

eg. 0100000000 - 090000000 depending on your matnr range

former_member667836
Active Participant
0 Kudos

solved.Thanks for all the reply