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

Performance tuning of SQL queries


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

New User


Joined: 07 Apr 2007
Posts: 3
Location: Hyderabad

PostPosted: Sat Apr 14, 2007 12:40 am
Reply with quote

Hi
How the performance tuning can be done to sql queries what are the steps to be followed.

Thanks
Shanthi
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: Sat Apr 14, 2007 1:46 am
Reply with quote

Hello,

One place to start tuning a query is to make sure it only returns needed rows and that the item(s) used in the "where" (the predicates) are a key.

If you are joining tables, make sure the join is on a key. In addition to avoiding the dread cartesian product, you also want to avoid selecting specific rows from one table and then matching these agains another entire table.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Sun Apr 15, 2007 11:20 am
Reply with quote

Nomally while using curosrs, we do some manipulation for eery fetched row, this may results in much time, thus holding the resources fo a lot of time and this may effects the performance.


In this case we can use the Fast unload and then we can dump the output of the cursor into a flatfile and then we can continue the process or manipulation. This improves the perfomance of the query.


This is the way we follow for a report generation program in our project recently.


I think this may helps you....

If any alternate ways please suggest me.
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 exploiting Z16 performance PL/I & Assembler 2
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Which SORT utility can improve the Pe... DFSORT/ICETOOL 16
No new posts COBOL Performance Tuning COBOL Programming 6
No new posts CICS Performance statistics CICS 3
Search our Forums:

Back to Top