GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Oracle  >  Database Administration

 Print  |  
Question:  Changed Performance

Answer: When yesterday developer gives the following command:

select count(*) from [table name]

it gives the output within minutes, today the same command takes hours? What will you check?


June 06, 2008 11:26:00 #1
 irfanyell   Member Since: April 2008    Total Comments: 4 

RE: Changed Performance
 
we have to take the sql trace. but it cannot be read by us. so we have to take the tkprof of this file which can be read by us. to take the sql trace fire the below command

SQL>alter session set sql_trace=true;

then fire that sql statement

SQL>select count(*) from [tablename];

it will generate a trace file in udump

then stop the trace by following command

SQL>alter session set sql_trace=false;

then produce a tkprof

$tkprof [filename] [kprof filename]

regards
irfan
     

 

Back To Question