Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Performance tuning of SQL queries

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Performance tuning of SQL queries
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

Site Director


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

PostPosted: Sat Apr 14, 2007 1:46 am    Post subject:
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    Post subject: Hello
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts BC, BCR, BRC, BRCL performance steve-myers PL/I & Assembler 0 Fri Dec 23, 2016 7:44 am
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What are the way we can improve CPU p... Gunapala CN DB2 10 Mon Oct 24, 2016 2:16 pm
No new posts DISP=(SHR,PASS) performance opinion steve-myers JCL & VSAM 1 Wed Dec 02, 2015 11:53 pm
No new posts Performance tuning of Online system bipinpeter All Other Mainframe Topics 2 Thu Nov 26, 2015 2:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us