Re: tracing makes the sql run faster

  • From: Prasada.Gunda@xxxxxxxxxxxxxxxx
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Mon, 1 Nov 2004 23:37:28 -0500




I think I found the problem.  I mentioned in my previous email that the
tracing is making sql run faster and couldn't figure out what was going on.

I found  in the v$sql_plan that the sql uses nested loops semi join when it
runs slower. When I turn on the trace, it is using nested loops join and
makes the query run faster.  It is really strange why trace does this.  Has
any one experienced this before?

Another thing is, we just bounced the database. When I do the tests again,
it is not using nested loops semi join even though there is _no_ trace on.
Looks like CBO is changing plan during the day when there is a peak
activity. I am not sure why it changes the plan. I will monitor it tomorrow
and posts the findings.

Thanks.

Best Regards,
Prasad
860 843 8377


                                                                                
                                                         
                      Prasada.Gunda@hartf                                       
                                                         
                      ordlife.com                To:       
oracle-l@xxxxxxxxxxxxx                                                        
                      Sent by:                   cc:                            
                                                         
                      oracle-l-bounce@fre        Subject:  tracing makes the 
sql run faster                                              
                      elists.org                                                
                                                         
                                                                                
                                                         
                                                                                
                                                         
                      11/01/2004 02:00 PM                                       
                                                         
                      Please respond to                                         
                                                         
                      Prasada.Gunda                                             
                                                         
                                                                                
                                                         
                                                                                
                                                         








Hello All,

We have an application which uses Oracle Forms 6i. One particular query
takes very long time when it runs in the forms application. When I trace
the user session to see what was going on,  surprisingly query runs much
faster and tkprof output looks fine. This query runs faster when I run it
sqlplus even with out the trace on.

How else I can trace to see what is going on? Did any one experience this
before? I am working with Oracle but wanted to check here as well.
Environment : 9.2.0.5 and Sun Solaris.

Any thoughts or inputs are much appreciated.

Thanks.

Best Regards,
Prasad
860 843 8377



*************************************************************************
PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary,
confidential and/or privileged information.  If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication and
destroy all copies.
*************************************************************************

--
//www.freelists.org/webpage/oracle-l



--
//www.freelists.org/webpage/oracle-l

Other related posts: