How to tune Query on Large Oracle Table [message #672716] |
Thu, 25 October 2018 07:23  |
 |
sacharya2017
Messages: 19 Registered: January 2017
|
Junior Member |
|
|
Hi,
I would like to know the ways to Tune SQL statements using large oracle non-partitioned table, large in size and large in number of rows.
I can think of ways
1>DB_FILE_MULTIBLOCK_READ_COUNT?
2> turn on parallelism if have enough resources?
3>have large buffer cache and cache the table data?
4>what else?
thanks
|
|
|
|
|
|
|
|
Re: How to tune Query on Large Oracle Table [message #672734 is a reply to message #672720] |
Thu, 25 October 2018 14:15   |
John Watson
Messages: 8836 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
sacharya2017 wrote on Thu, 25 October 2018 13:42hi Black Swan,
I do not have any of this info that you have asked. The reason I am posting this question is because it was asked in interview so i'm just looking for general guideline to start with or what should be DBA's approach if you were to tune SQL like this. yes you look at the explain plan and you see it's doing full tables scan and it requires most of the data to satisfy the query.
thanks You were probably being asked about the method you would follow. My answer would be:
1. Determine how Oracle is executing the SQL
2. Work out why Oracle is executing it that way
3. See if any other ways would be better
4. If so, how can I push the CBO in that direction
Your suggestions a]were all precise technical changes which might have no relevance to the problem.
|
|
|
|
|
Re: How to tune Query on Large Oracle Table [message #672806 is a reply to message #672777] |
Fri, 26 October 2018 12:51  |
 |
sacharya2017
Messages: 19 Registered: January 2017
|
Junior Member |
|
|
EdStevens wrote on Fri, 26 October 2018 08:51John Watson wrote on Thu, 25 October 2018 14:15sacharya2017 wrote on Thu, 25 October 2018 13:42hi Black Swan,
I do not have any of this info that you have asked. The reason I am posting this question is because it was asked in interview so i'm just looking for general guideline to start with or what should be DBA's approach if you were to tune SQL like this. yes you look at the explain plan and you see it's doing full tables scan and it requires most of the data to satisfy the query.
thanks You were probably being asked about the method you would follow. My answer would be:
1. Determine how Oracle is executing the SQL
2. Work out why Oracle is executing it that way
3. See if any other ways would be better
4. If so, how can I push the CBO in that direction
Your suggestions a]were all precise technical changes which might have no relevance to the problem.
Indeed, it appears that the OP falls into the too common trap of approaching an interview like a college semester exam instead of approaching it like an discussion. And assuming that, like an exam, every question is supposed to have a precise technical answer when quite often they are probing the candidate's methods more than his knowledge of specifics.
Hi EdStevens,
Yes, The process should be more towards discussion rather than technical changes. but as you're being judged during the entire process not by just 1 or 2 but several professionals, so you got to bring your technical expertise/skills/experience to present the case. My Interview lasted for 7 hours(8:00-3:00). I was interviewed by more than 15 people. no lunch time.
The feedback I got after 4 days
"Mr. Sacharya you have an excellent personality.Your core Database skills/knowledge is very good. we all have liked you but.....we have a different requirements and hence not moving forward with you."
I don't regret what has happened as This does not decrease my Value not even a single bit just because it's their inability to see how good/worth am I. Life moves on so do I. The only reason I had asked this question here to see if I can improve and be better at something like this.
regards
|
|
|