Home » SQL & PL/SQL » SQL & PL/SQL » time consuming query (oralce 10g)
time consuming query [message #416815] Tue, 04 August 2009 07:33 Go to next message
rajasekhar857
Messages: 500
Registered: December 2008
Senior Member
DECLARE
  job BINARY_INTEGER := :job;
  next_date TIMESTAMP
WITH TIME ZONE := :mydate;

broken      BOOLEAN      := FALSE;
job_name    VARCHAR2(30) := :job_name;
job_subname VARCHAR2(30) := :job_subname;
job_owner   VARCHAR2(30) := :job_owner;
job_start TIMESTAMP
WITH TIME ZONE := :job_start;

window_start TIMESTAMP
WITH TIME ZONE := :window_start;

window_end TIMESTAMP
WITH TIME ZONE := :window_end;
BEGIN
  BEGIN
    EXECUTE IMMEDIATE('alter index pagecontents_index rebuild online parameters(''sync'')');
    COMMIT;
  END;
  :mydate := next_date;
  IF broken THEN
    :b := 1;
  ELSE
    :b := 0;
  END IF;
END;



what is the logic behind this and why it is taking so much time then

[Updated on: Tue, 04 August 2009 07:38]

Report message to a moderator

Re: time consuming query [message #416816 is a reply to message #416815] Tue, 04 August 2009 07:36 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
42
Re: time consuming query [message #416822 is a reply to message #416815] Tue, 04 August 2009 08:23 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Many things far beyond your skills; skip it.

Regards
Michel
Re: time consuming query [message #416878 is a reply to message #416822] Tue, 04 August 2009 23:35 Go to previous message
Kevin Meade
Messages: 2101
Registered: December 1999
Location: Connecticut USA
Senior Member
looks like you are rebuilding a context index. Do some googling to see if this is so. How long it takes? maybe there were just a lot of changes to the index.

Then again what do I know. The code is not exactly forth comming with information. Too bad the original developer didn't offer up a little commentary on what he/she was doing.

Good luck, Kevin

[Updated on: Tue, 04 August 2009 23:35]

Report message to a moderator

Previous Topic: Table wide, partition wide and block level dictionary approach
Next Topic: How to create a table using Trigger
Goto Forum:
  


Current Time: Sat Dec 03 06:07:47 CST 2016

Total time taken to generate the page: 0.07207 seconds