IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can we use aggregate function like MAX in a cobol Db2 pgm?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shchan

New User


Joined: 06 Jun 2007
Posts: 58
Location: Hyderabad

PostPosted: Fri Jan 28, 2011 9:08 am
Reply with quote

Hi,

Can anybody suggest on the usage of aggregate function like MAX in embedded sql or will these kind of sql statements effect the perfomance of DB2.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jan 28, 2011 10:20 am
Reply with quote

Hello,

If you are trying to select the max value of some non-key field (say an amount) and there are 100 million rows in the table, returning the MAX amount will surely impact performance. . .

If you are trying to select the max value of another amount field in a different table that has only 10 rows, there will be no performance impact. . .

The more work you cause the system to do, the greater the performance impact.

As i occasionally mention, when testing some new process/functionality, full-volume testing should be done well before deployment. Processes that run very well with almost no data often are not executable in the "real world". . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top