Thank you appnair,Syntergy,jjlang for your comments and suggestions.
I had logged a call with OT for this problem.
This was solved by performing two actions:
1) We have four front end servers and an admin box. It was found that notifications were enabled on the front end servers also which was leading to race conditions.
So notifications were disabled on frint end servers
2)Furthermore OT provided us with a patch which optimizes the query which i had referred in my earlier message
I am providing the patch for benefit of others. The patch is available only for Oracle backend.
__________________pat07200402__________________
# This patch was created by Xu Moua (Senior Product Specialist) to resolve
# a Notifications performance issue if there is a large backlog of events
# in LLEventQueue table.
# Patch PAT07200402 created at Thu Jul 08 10:26:22 2004
m {'kernel','llagent'}
o {#101,&kernel[257]}
N Pat07200402 Globals
o {#105,&llagent[12476]}
N NodeEventProcessor orphan
f LoadVolumeCache
s
function Void LoadVolumeCache()
Dynamic s
Dynamic t
Dynamic r
Dynamic x
Object obj
String subtypes
// does the cache already exist
if IsUndefined( .fVolumeCache )
// create the assoc
.fVolumeCache = CacheTree.Create()
// create the node cache .. load all folder nodes
for obj in $LLIAPI.LLNodeSubsystem.GetItems()
if obj.fContainer || ( obj.fAssociatedVolume != 0 )
subtypes += ( Str.String( obj.fSubType ) + ',' )
end
end
// the following SQL will bring back all ancestor container nodes where
// ALL of the events happened. This is NOT good if we have a large backlog of events
// in the LLEventQueue table. This is because this SQL will work on ALL events
// regardless of the number of Events to process per pass. Which could potentially
// take an excessive amount of time to execute.
// This fix is currently on for Oracle. See the 'else' branch below
if !( .fPrgCtx.fDBConnect.fDbInfo.servType == "ORACLE" )
s = 'select ' + \
'DataID,' + \
'ParentID,' + \
'Name,' + \
'SubType ' + \
'from ' + \
'DTree ' + \
'where ' + \
'(SubType in (' + subtypes[ : -2 ] + '))'
else
// we want to only bring back all the ancestor container nodes of only the events
// we are concerned about during this Agent run. Therefore, we've included the
// condition "where EventSeqNo <= .fMaxESN" in the following SQL statement.
s = ' select ' + \
'DataID ,' + \
'ParentID,' + \
'Name,' + \
'SubType ' + \
'from ' + \
'DTree ' + \
'where ' + \
' (SubType in (' + subtypes[ : -2 ] + ') ) ' + \
' start with DataID in ' + \
' ( ' + \
' ( select unique( e.EventInt3 * -1 ) from LLEventQueue e where e.EventSeqNo <= :A1 ) ' + \
' Union ' + \
' ( select unique( e.EventInt3 ) from LLEventQueue e where e.EventSeqNo <= :A2 ) '+ \
' ) ' + \
' connect by prior ABS(ParentID)= DataID '
end
r = CAPI.Exec( .fConnect, s, .fMaxESN, .fMaxESN )
// populate the cachetree
if IsNotError( r )
for t in r
CacheTree.Add( .fVolumeCache, t.DataID, t.ParentID, t )
end
else
.Err( Str.Format( [LLNotify_ErrMsg.CouldNotAccessVolumeTree1], r ) )
end
// update stats
.fController.StatsAdd( 1500, Length( r ) ) // volume nodes loaded
end
end
sEND
____________________________pat07200402 ends____________
Thanks,
Dhiraj