Home » RDBMS Server » Performance Tuning » V$SESSION_LONGOPS - Looking for more than last 16 ops (10.2.0.4.0)
V$SESSION_LONGOPS - Looking for more than last 16 ops [message #457754] Tue, 25 May 2010 18:55 Go to next message
rleishman
Messages: 3728
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Doing some data conversion at the moment and using V$SESSION_LONGOPS to help predict when the current task will be finished so I can run the next one.

V$SESSION_LONGOPS seems to have only the last 16 long operations for the session. Older operations are automatically purged. My bigger tables have 32 partitions, so after the first 16 are processed, I cannot tell which partition I am up to.

Googling "old longops" and "longops history" didn't help, nor did the same searches on this site. The Oracle Reference manual section on V$SESSION_LONGOPS did not mention that older entries are purged.

Any suggestions on seeing older operations?

Ross Leishman
Re: V$SESSION_LONGOPS - Looking for more than last 16 ops [message #457832 is a reply to message #457754] Wed, 26 May 2010 02:19 Go to previous messageGo to next message
Michel Cadot
Messages: 68650
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I'm surprised by this limit of 16 operations. As far as I know the number of rows in x$ksulop table (the one below v$session_longops) is the least of 500 and 2*sessions parameter. I do not know any limit per session.

As for the "history", when Oracle needs to allocate an entry, it searches in the table free list (list of free entries in the table), if he does not find any, it scans the table and put in the free list all entries that have not been updated since 5 minutes and then retries the allocation (and so some entries may be stolen by new ones).

Regards
Michel
Re: V$SESSION_LONGOPS - Looking for more than last 16 ops [message #457876 is a reply to message #457832] Wed, 26 May 2010 04:43 Go to previous messageGo to next message
rleishman
Messages: 3728
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Actually, I'm not certain it is per session, but per SQL_ADDRESS / SQL_HASH_VALUE. I don't have direct access to X$KSULOP, so I cannot tell what it is doing.

Another interesting characteristic is that it will purge history SOMETIMES at each step of the plan. e.g. If it full scans 32 partitions and then joins to another partitioned table, then a few partitions into the new table it will clear the LONGOPS history of the first table - even though the total operations retained is less than 16.

Ross Leishman
Re: V$SESSION_LONGOPS - Looking for more than last 16 ops [message #457879 is a reply to message #457876] Wed, 26 May 2010 04:46 Go to previous message
Michel Cadot
Messages: 68650
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Can you post a test case I can reproduce (DDL for the table and your interested statement, for the data I can generate them)?

Regards
Michel
Previous Topic: Different EXPLAIN PLAN Before and after execution
Next Topic: Need help with tuning a query
Goto Forum:
  


Current Time: Sun May 12 13:32:25 CDT 2024