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 too big

Former Member
0 Kudos

Hi

A program is making use of the table cdhdr

With where condition objectid AND udate. using a for all entries condition

But since this table contain 28 million data in is when a time out occur because the search is too big and also we are not making use of the primary key criteria. Please advise how this can be solve. to prevent time out

1 ACCEPTED SOLUTION

ThomasZloch
Active Contributor
0 Kudos

Make use of the primary key criteria. No way around that.

Most of the time you are looking for change documents for a certain object (e.g. EINKBELEG = purchase orders), so always select a single value of OBJECTCLAS to even have a chance for a quick select.

Not too many values in the internal table with OBJECTIDs cannot hurt either.

Thomas

4 REPLIES 4

Former Member
0 Kudos

Put OBJECTCLAS in the where clause before Object ID... which will improve the performance..

Thanks

Amol Lohade

former_member181995
Active Contributor
0 Kudos

Try to use all three keys:

OBJECTCLAS

OBJECTID

CHANGENR

more over for optimization you can give user name option on selection-screen and use this also in query with where condition with USERNAME.

ThomasZloch
Active Contributor
0 Kudos

Make use of the primary key criteria. No way around that.

Most of the time you are looking for change documents for a certain object (e.g. EINKBELEG = purchase orders), so always select a single value of OBJECTCLAS to even have a chance for a quick select.

Not too many values in the internal table with OBJECTIDs cannot hurt either.

Thomas

vinod_vemuru2
Active Contributor
0 Kudos

Hi,

2 solutions.

1. Try to use all primary keys in where clause.(Even though it will be bit slow:-) )

2. If u don't have any front end interactions like GUI_DOWNLOAD, GRID display etc then instead of running it in foreground run it as batch job. It creates the spool. U can take the print from spool later.

I think second way is better.

Thanks,

Vinod.