Query wih bind variables [message #294203] |
Wed, 16 January 2008 16:29 |
gkrishn
Messages: 506 Registered: December 2005 Location: Putty a dark screen
|
Senior Member |
|
|
Hi,
There is a query which takes 1 day to complete.Since it is fired from application, i dont have the quer handy.I got the query through toad application but it has lot of bind variables with it .
I tried with following command (from sys user)to trace that session , but it is not generating any trace-file in user_dump_dest.
exec sys.dbms_system.set_sql_trace_in_session(35, 15, true);
any idea what could be the issue here.
Thanks
|
|
|
|
Re: Query wih bind variables [message #294280 is a reply to message #294271] |
Thu, 17 January 2008 01:25 |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
I suspect SQL*Trace will only create the file when the first trace message arrives (someone else may be able to confirm or deny this).
If so, then if you have a big join or sort then it might spend all day between the execution and the fetch of the first row. If you started the trace after the execute then the trace file might not be created for a while, but it will get created eventually.
Ross Leishman
|
|
|
Re: Query wih bind variables [message #294317 is a reply to message #294203] |
Thu, 17 January 2008 03:55 |
gkrishn
Messages: 506 Registered: December 2005 Location: Putty a dark screen
|
Senior Member |
|
|
Michel ,
Yes, everything is correct .
rleishman,
What you said is correct .it may/maynot generate trace immediately.i got trace only one time though i tried more than 10 times.
all,
what is the procedure to check explain plan for a query with bind variables ?Will trace file has query with bind variables replaced ?
[Updated on: Thu, 17 January 2008 04:00] Report message to a moderator
|
|
|
|
|
|