Query Slow [message #398768] |
Fri, 17 April 2009 08:46 |
sbmk_design
Messages: 88 Registered: April 2007 Location: CHENNAI
|
Member |
|
|
Hello Experts
A Query yesterday took 5 min to give output, but today it takes 60 min to give output.
a) In this one day gap no database parameters were changed.
b) No index/constraints were dropped.
1) What could be the reasons ?
2) What all are the things I have to check ?
Note
----
This is the only interview question(repeatedly asked).
Please help....
I collected some notes from Google, but panel members are not satisfied with my answer.That is why I am asking u, please..
Thanks in advance
sbmk_design
|
|
|
|
|
|
|
|
|
|
|
Re: Query Slow [message #404101 is a reply to message #403615] |
Wed, 20 May 2009 06:53 |
sbmk_design
Messages: 88 Registered: April 2007 Location: CHENNAI
|
Member |
|
|
Dear Mr.bangalibor
1)How u identified the problem (i.e what all are the data dictionary views/tables u used)
2)What solution helped in your case. Can u please share your experience..........
Thanks in advance
sbmk_design
|
|
|
Re: Query Slow [message #404184 is a reply to message #404101] |
Wed, 20 May 2009 12:41 |
bangalibor
Messages: 15 Registered: September 2008 Location: dhaka
|
Junior Member |
|
|
First of all,
Check the execution plan of the query.
check does the index exists on the
where clause,foreign key,
does the query going for
where like,where <>,where not null,where null so on
does your where clause has function defined onthe column
like where upper(ename)='ALEX'
does your table have a join ,
what kind of join it is going for..
where 2 table or multiple join
wht is the driving table in this case
if there is no index,create an index and check
remember one thing,
creating index may make your query slower too. so, create verify and then move away....
|
|
|