%SYS.PTools.SQLBenchMarkQueries
persistent class %SYS.PTools.SQLBenchMarkQueries extends %Library.Persistent
SQL Table Name: %SYS_PTools.SQLBenchMarkQueries
This Class gets populated from the %SYS.PTools.SQLStats.Init() method when gathering stats is turned on. There is more info on how to run Stats in %SYS.PTools.SQLStats.
The class contains the SQLText, the Job Number, the Time Stamp from when the query was run, and the Parameters that were used.
The Method Run() will loop over all the saved queries and execute them one after the other.
Because ^%SYS.PTools.BenchMarkResults stores data in the CACHE DB you need to have %All to execute the Run() method.
Property Inventory
Method Inventory
Properties
Methods
This is a simple example of what can be done with the data stored in this table.
This method take 2 parameters:
- NameSpace - the NameSpace where you want to run the Benchmark
- Display - 1 or 0 to control output to the screen
This method will loop over the queries that are stored in this classes and execute them as Dynamic SQL statements SQLStats is turned off for this run and the state is returned when the code finishes The code will display and save data for fetching the first row and for fetching all the rows The data saved will be: Global Refs, Lines of Code, Rows Returned, and Total Time. All the results are stored in the %SYS.SQLBenchMarkResults class.
Queries
SELECT P.Id, P.NameSpace, P.QueryText, P.RunTime, P.JobNumber, PV.PValues FROM %SYS_PTools.SQLBenchMarkQueries P LEFT OUTER JOIN %SYS_PTools.SQLBenchMarkQueries_PValues PV ON P.ID = PV.SQLBenchMarkQueries
Indexes
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %AddToSyncSet()
- %BMEBuilt()
- %CheckConstraints()
- %CheckConstraintsForExtent()
- %ClassIsLatestVersion()
- %ClassName()
- %ComposeOid()
- %ConstructClone()
- %Delete()
- %DeleteExtent()
- %DeleteId()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Exists()
- %ExistsId()
- %Extends()
- %GUID()
- %GUIDSet()
- %GetLock()
- %GetParameter()
- %GetSwizzleObject()
- %Id()
- %InsertBatch()
- %IsA()
- %IsModified()
- %IsNull()
- %KillExtent()
- %KillExtentData()
- %LoadFromMemory()
- %LockExtent()
- %LockId()
- %New()
- %NormalizeObject()
- %ObjectIsNull()
- %ObjectModified()
- %Oid()
- %OnBeforeAddToSync()
- %OnDetermineClass()
- %Open()
- %OpenId()
- %OriginalNamespace()
- %PackageName()
- %PhysicalAddress()
- %PurgeIndices()
- %Reload()
- %RemoveFromSaveSet()
- %ResolveConcurrencyConflict()
- %RollBack()
- %Save()
- %SaveDirect()
- %SaveIndices()
- %SerializeObject()
- %SetModified()
- %SortBegin()
- %SortEnd()
- %SyncObjectIn()
- %SyncTransport()
- %UnlockExtent()
- %UnlockId()
- %ValidateIndices()
- %ValidateObject()
Storage
Storage Model: CacheStorage (%SYS.PTools.SQLBenchMarkQueries)
^%sqlcq($NAMESPACE,"PTools","Bench","Queries","D")(ID,"PValues",n) | = | PValues(n) |
^%sqlcq($NAMESPACE,"PTools","Bench","Queries","D")(ID) | = | %%CLASSNAME
QueryText
NameSpace
RunTime
JobNumber
|