%SYS.PTools.UtilSQLStatements
persistent class %SYS.PTools.UtilSQLStatements extends %Library.Persistent
SQL Table Name: %SYS_PTools.UtilSQLStatements
Class: %SYS.PTools.UtilSQLStatements Replaces: %SYS.PTools.SQLUtilities [DEPRECATED] Purpose: This class is used to store the SQL Statement details collected from the following Locations within InterSystems IRIS for Index Analysis, Performance Optimizations, and Additional Processing: - cached queries - Class Methods - Class Queries - MAC Routines The following Methods and Queries, defined in the abstract interface class %SYS.PTools.UtilSQLAnalysis, are used to collect, analyze, and optimize the SQL Statements in this class: Methods Queries ------------------------------- ----------------------------------- - getAllSQLStmts - getSQLStmts - getSQLStmts - getAllCachedQrySQLStmts - getCachedQrySQLStmtsByDays - getCachedQrySQLStmtsByClass - getAllClassMethSQLStmts - getClassMethSQLStmtsByClass - getAllClassQrySQLStmts - getClassQrySQLStmtsByClass - getAllRtnQrySQLStmts - getRtnQrySQLStmtsByRtn - getAllIndices - indexUsage - indexUsage - tableScans - tableScans - tempIndices - tempIndices - joinIndices - joinIndices - outlierIndices - outlierIndices - exportSQLUtilStmts - exportSQLUtilStmtRslts - exportSQLUtilities - clearSQLStatements - clearSQLAnalysisDB - countSQLStmtTypes - UtilSQLStmtsAndAnalysisDBView Data Storage: ^%sqlcq("SAMPLES","PTools","util","SQLStmts","{C|D|I|S}") Error Storage: ^%sqlcq($NAMESPACE,"PTools","Error"[...])=$LIST Info
Property Inventory
Method Inventory
Properties
Methods
Method: clearSQLStatements Replaces: ClearStatements (%SYS.PTools.SQLUtilities) [DEPRECATED] Status: New Method to replicate Backward-Compatible Method it 'Replaces' Purpose: Delete all of the data stored in the '%SYS.PTools.UtilSQLStatements' class, based on the specified parameters... Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.UtilSQLStatements).clearSQLStatements(...) SQL: CALL %SYS_PTools.UtilSQLStatements_clearSQLStatements(...) SELECT %SYS_PTools.UtilSQLStatements_clearSQLStatements(...) NOTE: This 'SqlProc' method can be invoked with either the CALL-interface or the SELECT-interface. Both interfaces execute the method: the CALL-interface does not return any resulting value, while the SELECT-interface does. Examples: The following examples shows the use of this method: #1 Delete all of the data stored in the '%SYS.PTools.UtilSQLStatements' class in the current namespace: set status=##class(%SYS.PTools.UtilSQLStatements).clearSQLStatements() Data Storage: ^%sqlcq($NAMESPACE,"PTools","util","SQLStmts") Parameters: ns - The namespace in which to clear SQL Index/Analysis Statstics [DEFAULT: Current Namespace] clearErrs - 0 = Don't delete the 'PTools' Application Errors 1 = Delete all of the 'PTools' Application Errors [DEFAULT: 0] returnType - 0 = Return a %Status code of either $$$OK or $$$ERROR() 1 = Return the number of Stats rows deleted from the following class: %SYS.PTools.UtilSQLStatements [DEFAULT: 0] ptInfo - A Pass By Reference information array that returns detailed information to the user in the following format: ptInfo(category,variable)=value OR $LB(val1,...,valn) Where category = { "cnt" | "curr" | "term" | ... } variable = A var corresponding to the given 'category' Example: ptInfo("cnt","clearSQLStatements")=The number of rows deleted via this method RETURN Value: Based on the value of the 'returnType' parameter, return one of the following: 0: Return a %Status code of either $$$OK or $$$ERROR() 1: Return the number of Stats rows deleted from the following class; Otherwise, return an error message if an error occurred: %SYS.PTools.UtilSQLStatements
Queries
SELECT ID, Type, Name, MethodName, ImportPackage, SQLTextExt, SQLTextRaw FROM %SYS_PTools.UtilSQLStatements
Query: UtilSQLStatementsView [SQL: UtilSQLStatementsView] Status: New Query/View to replicate Backward-Compatible Query/View it 'Replaces' Purpose: Class View which returns all of the SQL Statements information stored in the '%SYS.PTools.UtilSQLStatements' class/table
Indexes
Triggers
Inherited Members
Inherited Methods
- %%CLASSNAMELogicalToStorage()
- %%CLASSNAMEStorageToLogical()
- %AddToSaveSet()
- %AddToSyncSet()
- %BMEBuilt()
- %BuildIndicesAsync()
- %BuildIndicesAsyncResponse()
- %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()
- %OnDeleteFinally()
- %OnDetermineClass()
- %OnOpenFinally()
- %OnSaveFinally()
- %Open()
- %OpenId()
- %OriginalNamespace()
- %PackageName()
- %PhysicalAddress()
- %PurgeIndices()
- %Reload()
- %RemoveFromSaveSet()
- %ResolveConcurrencyConflict()
- %RollBack()
- %Save()
- %SaveDirect()
- %SaveIndices()
- %SerializeObject()
- %SetModified()
- %SortBegin()
- %SortEnd()
- %SyncObjectIn()
- %SyncTransport()
- %UnlockExtent()
- %UnlockId()
- %ValidateIndices()
- %ValidateObject()
- %ValidateTable()
Storage
Storage Model: Storage (%SYS.PTools.UtilSQLStatements)
^%sqlcq($NAMESPACE,"PTools","util","SQLStmts","D")(ID) |
= | %%CLASSNAME
Type
Name
ImportPackage
MethodName
SQLTextRaw
|