Fine tuning a SQL??



IBM's flagship relational database management system

Fine tuning a SQL??

Postby sinmani » Fri Mar 23, 2012 5:57 pm

My SQL is not performing well. Describe how will you fine tune it?
-----------------------------------------
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
sinmani
 
Posts: 93
Joined: Thu Mar 22, 2012 10:02 am
Has thanked: 14 times
Been thanked: 0 time

Re: Fine tuning a SQL??

Postby Robert Sample » Fri Mar 23, 2012 6:32 pm

How high is up?
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Fine tuning a SQL??

Postby GuyC » Fri Mar 23, 2012 7:37 pm

I would ask on a forum of psychic and pray to any diety available.
GuyC
 
Posts: 315
Joined: Tue Aug 11, 2009 3:23 pm
Has thanked: 1 time
Been thanked: 4 times

Re: Fine tuning a SQL??

Postby Akatsukami » Fri Mar 23, 2012 8:38 pm

sinmani wrote:My SQL is not performing well. Describe how will you fine tune it?

For Rs. 50,000/day :P
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Fine tuning a SQL??

Postby sinmani » Fri Mar 23, 2012 9:03 pm

well guys stop kicking my ** :)

What I think is i should use explain option and then look into plan table to get the current call path DB2 is using and then try to change it.
But how exactly would that help me?
What rows I should look into plan table?

How can I do I know which path will be better and ensure that DB2 uses it?
-----------------------------------------
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
sinmani
 
Posts: 93
Joined: Thu Mar 22, 2012 10:02 am
Has thanked: 14 times
Been thanked: 0 time

Re: Fine tuning a SQL??

Postby BillyBoyo » Fri Mar 23, 2012 9:22 pm

Talk to your colleagues, DBA,,,,
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Fine tuning a SQL??

Postby Robert Sample » Fri Mar 23, 2012 11:47 pm

sinmani, in your second post you are wanting to know the process to identify performance issues in an SQL statement; in your first post you did not clearly identify that this is what you were looking for. Your first post basically said you have an SQL statement that is having performance issues and you want help in fixing it -- without identifying (1) whether or not there really is a performance issue (if you're reading a data base with 10 million rows, then I'm sorry but the computer is going to take a while to read them), or (2) what is the SQL statement, or (3) why we would WANT to fine tune it?
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post