You
will be asked in many interviews
"
if user come to you and asked, my query execution is very slow .
As a DBA what
are the analysis and necessery steps you will take?? "
This
is the most blood sucking question in all interviews. J
AnyWays,
I will tell you the proper Answer here
Possible Answers :
You
Need to check wait event for that session. if query is running & slowness
could be due to different reasons...such as - IO, Network,
High CPU on Other process,. etc.
So,
Check initially two points:
blocking
sessions and sql elapsed time. Then you can get the direction to follow. With
blocking sessions, before do a simple kill, you must identify the reason of the
lock, could be a poor tuning sql.
First
you have to check is there network traffic or not, second you have to check is
the path change check actual path and previous path and also do full table
scan, is there any locking on table
Find
if there is blocking session. ..second the used tables in query got updated
statistics or not....use sql tuning advisor.. implement recomendation after
discussion with application team..
No comments:
Post a Comment