%SYS.PTools.StatsSQL
persistent class %SYS.PTools.StatsSQL extends %SYS.PTools.Stats
SQL Table Name: %SYS_PTools.StatsSQL
Class:        %SYS.PTools.StatsSQL
Replaces:     %SYS.PTools.SQLStats  
Property Inventory
- CursorName
- Hash
- ImportSchema
- ModuleName
- NameSpace
- Parameters
- QueryCompileTime
- QueryText
- QueryType
- RoutineName
- RoutineNameUCQCaller
- SQLIndexHash
- SQLStatsFlag
- SQLTextRaw
- StatsGroup
- StatsMarker
- TotalCommandsExecuted
- TotalCounter
- TotalDiskWait
- TotalGlobalRefs
- TotalLinesOfCode
- TotalModuleCount
- TotalRowCount
- TotalTimeSpent
- TotalTimeToFirstRow
- VarianceTimeSpent
- creationDate
- creationTime
Method Inventory
- Export()
- ExportAll()
- ExportSQLQuery()
- GetLastSQLStats()
- GetSQLStatsFlag()
- GetSQLStatsFlagByPID()
- GetSQLStatsSaveFlag()
- GetStats()
- ImportSchema()
- Purge()
- QueryText()
- SetSQLStats()
- SetSQLStatsFlag()
- SetSQLStatsFlagByNS()
- SetSQLStatsFlagByPID()
- SetSQLStatsFlagJob()
- SetSQLStatsJob()
- SetSQLStatsSaveFlag()
- SetSQLStatsSaveFlagJob()
- TriggerOnDelete()
- aggregateSQLStats()
- buildPPcost()
- changeCost()
- clearStatsSQL()
- clearStatsSQLAllNS()
- exportStatsSQL()
- getImportSchema()
- getQueryText()
- map()
- newSQLStats()
- possiblePlans()
- possiblePlansClose()
- possiblePlansExecute()
- possiblePlansFetch()
- possiblePlansStatsClose()
- possiblePlansStatsExecute()
- possiblePlansStatsFetch()
- saveSQLStats()
- startSQLStats()
- stopSQLStats()
- useAggregatedData()
- version()
Properties
Methods
Method:       Export [SQL: StatsSQL_Export]
Replaces:     Export [SQL: SQLStats_Export]  (%SYS.PTools.SQLStats)  
Method:       ExportAll [SQL: StatsSQL_ExportAll]
Replaces:     ExportAll [SQL: SQLStats_ExportAll]  (%SYS.PTools.SQLStats)  
Method:       ExportSQLQuery [SQL: StatsSQL_ExportSQLQuery]
Replaces:     Export [SQL: SQLQuery_Export]  (%SYS.PTools.SQLQuery)  
Method:       GetLastSQLStats [SQL: StatsSQL_GetLastSQLStats]
Replaces:     GetLastSQLStats [SQL: SQLStats_GetLastSQLStats]  (%SYS.PTools.SQLStats)  
Method: GetSQLStatsFlag [SQL: StatsSQL_GetSQLStatsFlag] Replaces: N/A Status: New Functionality Purpose: This method gets the flag that controls whether or not we collect SQL Statistics for each SQL Query execution Get the current value of the SQLStats-flag for the given 'flagType'. The SQLStats-flag (System/Job) controls whether or not SQL Statistics are collected for each SQL Query execution, and which performance statistics to be collected. The SQLStats-flag is a colon (:) delimited string comprised of the following individual components: SQLStats-flag={action-flag}:{collect-flag}:{condition-flag}:{condition-value}:{terminate-flag}:{flag-type} RULES: When (flagType=""), whether to use the SQLStats-flag (System) or the SQLStats-flag (Process/Job) is determined by the following rules: IF {action-flag} (Process/Job) = 0, then use SQLStats-flag (System) ELSE use SQLStats-flag (Process/Job) NOTE: This method has the following additional rule when passed the parameter: flagType="" RULE-G1: If {action-flag}=-1, then return zero (0) for each component-flag of the SQLStats-flag, except for the {flag-type} which is one (1) [indicating a Process/Job Flag setting], as in the following example: write $SYSTEM.SQL.GetSQLStatsFlag("") => "0:0:0::0:1" To retrieve the actual value for each component-flag of the SQLStats-flag in this example, pass a one (1) for the 'flagType' parameter: write $SYSTEM.SQL.GetSQLStatsFlag(1) => "-1:0:0::0:1" Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.StatsSQL).GetSQLStatsFlag(...) $SYSTEM.SQL.GetSQLStatsFlag(...) SQL: SELECT %SYS_PTools.StatsSQL_GetSQLStatsFlag(...) Examples: The following examples shows the use of this method: #1 Get the current value of the SQLStats-flag for the Job/System Flag based on SQLStats-flag Rules: set SQLStatsFlag=##class(%SYS.PTools.StatsSQL).GetSQLStatsFlag("") Data Storage: ^%SYS("sql","sys","SQLStats") Parameters: flagType - "" = Job/System Flag based on SQLStats-flag Rules [DEFAULT] 0 = System Flag 1 = Process/Job Flag returnActionFlag - 0 = Return the entire SQLStats-flag value [DEFAULT] 1 = Return only the {action-flag} value, which is the portion of the SQLStats-flag represented by the 1st colon (:) piece NOTE: This is the backward-compatible value ptInfo - A Pass By Reference information array that returns to the user detailed information in the following format: ptInfo(category,variable)=value Where category = { "current" | "terminate" | ["expired"] | ... } variable = A variable that corresponds to the given 'category' Example: ptInfo("current","SQLStatsFlag")=The SQLStats-flag value after method execution RETURN Value: The current value of the SQLStats-flag; Otherwise, return an error message if an error occurred
Method: GetSQLStatsFlagByPID [SQL: StatsSQL_GetSQLStatsFlagByPID] Replaces: N/A Status: New Functionality Purpose: This method gets the flag that controls whether or not we collect SQL Statistics about each SQL Query execution for the given 'pid' Get the current value of the SQLStats-flag for the given 'pid'. The SQLStats-flag (Process/Job) controls whether or not SQL Statistics are collected for each SQL Query execution, and which performance statistics to be collected. The SQLStats-flag is a colon (:) delimited string comprised of the following individual components: SQLStats-flag={action-flag}:{collect-flag}:{condition-flag}:{condition-value}:{terminate-flag}:{flag-type} NOTE: This method ONLY applies to the SQLStats-flag for the given 'pid' (Process/Job) and NOT the SQLStats-flag for the (System)! RESTRICTION: This method invocation requires %Admin_Operate:Use privilege Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.StatsSQL).GetSQLStatsFlagByPID(...) $SYSTEM.SQL.GetSQLStatsFlagByPID(...) SQL: SELECT %SYS_PTools.StatsSQL_GetSQLStatsFlagByPID(...) Examples: The following examples shows the use of this method: #1 Get the current value of the SQLStats-flag for the Job/System Flag based on SQLStats-flag Rules for PID# 12345: set SQLStatsFlag=##class(%SYS.PTools.StatsSQL).GetSQLStatsFlagByPID(12345) Data Storage: ^%SYS("sql","sys","SQLStats") Parameters: pid - The process ID ($JOB) for which to set the SQLStats-flag [DEFAULT: Current $JOB] returnActionFlag - 0 = Return the entire SQLStats-flag value [DEFAULT] 1 = Return only the {action-flag} value, which is the portion of the SQLStats-flag represented by the 1st colon (:) piece NOTE: This is the backward-compatible value ptInfo - A Pass By Reference information array that returns to the user detailed information in the following format: ptInfo(category,variable)=value NOTE: This method currently returns no 'ptInfo', but is included for future extensibility RETURN Value: The current value of the SQLStats-flag; Otherwise, return an error message if an error occurred
Method: GetSQLStatsSaveFlag [SQL: StatsSQL_GetSQLStatsSaveFlag] Replaces: N/A Status: New Functionality Purpose: This methods gets the flag that controls what type of SQL Statistics to collect about each run of a query Get the current value of the SQLStatsSave-flag for the given 'flagType'. The SQLStatsSave-flag (System/Job) controls what type of SQL Statistics are saved, either Original (backward-compatible) or Optimal (new). The SQLStatsSave-flag is a colon (:) delimited string comprised of the following individual flags: {type-flag} & {method-flag} RULES: When (flagType=""), whether to use the SQLStatsSave-flag (System) or the SQLStatsSave-flag (Job) is determined by the following rules: IF {type-flag} (JOB) = 0, then use SQLStatsSave-flag (System) ELSE use SQLStatsSave-flag (Job) Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.StatsSQL).GetSQLStatsSaveFlag(...) $SYSTEM.SQL.GetSQLStatsSaveFlag(...) SQL: SELECT %SYS_PTools.StatsSQL_GetSQLStatsSaveFlag(...) Examples: The following examples shows the use of this method: #1 Get the current SQLStatsSave-flag value based on the aforementioned 'flagType' Rules: set SQLStatsSaveFlag=##class(%SYS.PTools.StatsSQL).GetSQLStatsSaveFlag() Data Storage: ^%SYS("sql","sys","SQLStatsSave") Parameters: flagType - "" = Job/System Flag based on SQLStatsSave-flag Rules [DEFAULT] 0 = System Flag 1 = Job Flag RETURN Value: The current value of the SQLStatsSave-flag; Otherwise, return an error message if an error occurred
Method:       GetStats [SQL: N/A]
Replaces:     GetStats (%SYS.PTools.SQLStats)  
Method:       ImportSchema [SQL: N/A]
Replaced By:  getImportSchema (%SYS.PTools.StatsSQL) 
Status:       
Method:       Purge [SQL: StatsSQL_Purge]
Replaced BY:  clearStatsSQL [SQL: PT_clearStatsSQL] (%SYS.PTools.StatsSQL) 
Status:       
Method:       QueryText [SQL: N/A]
Replaced By:  getQueryText (%SYS.PTools.StatsSQL) 
Status:       
Method:       SetSQLStats [SQL: StatsSQL_SetSQLStats]
Replaces:     N/A
Status:       New Functionality
Purpose:      This method sets the flag that controls whether or not the 
              System collects SQL Statistics about each run of a query
              You can invoke different levels of SQL Statistics collection by 
              setting the SQLStats-flag, for the System with this method.
              The SQLStats-flag controls whether or not SQL Statistics are 
              collected for each SQL Query execution, and which performance 
              statistics to collect.
              The SQLStats-flag is a colon (:) delimited string comprised of 
              the following individual components:
                 SQLStats-flag={action-flag}:{collect-flag}:{condition-flag}:{condition-value}:{terminate-flag}:{flag-type}
Invocation:   This method can be invoked in the following ways:
                 ObjectScript: ##class(%SYS.PTools.StatsSQL).SetSQLStats(...)
                        $SYSTEM.SQL.SetSQLStats(...)
                   SQL: SELECT %SYS_PTools.StatsSQL_SetSQLStats(...)
Examples:     The following examples shows the use of this method:
   #1         Turn PTools ON to collects stats for all SQL modules (System):
              set oldStats=##class(%SYS.PTools.StatsSQL).SetSQLStats(3)
Data Storage: N/A
Parameters:
   actionFlag       - The portion of the SQLStats-flag which is represented by the 
                      1st colon (:) piece, and can have one of the following values:
                         0 = Query Compilation: Don't generator SQLStats collection 
                                                code for any Query Modules
                             Query Execution:   Don't collect SQLStats for any Query 
                                                Modules
                         1 = Query Compilation: Generator SQLStats collection code for 
                                                MAIN Query Module (Start & Stop)
                             Query Execution:   Don't collect SQLStats for any Query 
                                                Modules
                         2 = Query Compilation: Generator SQLStats collection code for 
                                                MAIN Query Module (Start & Stop)
                             Query Execution:   Collect SQLStats for MAIN Query Module 
                                                (Start & Stop)
                         3 = Query Compilation: Generator SQLStats collection code for 
                                                ALL Query Modules
                             Query Execution:   Collect SQLStats for ALL Query Modules
   returnActionFlag - 0  = Return the entire SQLStats-flag value           [DEFAULT]
                      1  = Return only the {action-flag} value, which is the portion
                           of the SQLStats-flag represented by the 1st colon (:) piece
                           NOTE: This is the backward-compatible value
   collectFlag      - The portion of the SQLStats-flag which is represented by the 2nd 
                      colon (:) piece, and is a numeric value representing which SQL 
                      Performance Statistics/Metrics to collect, with one of the 
                      following values:
                         "" = Collect All SQL Performance Metrics                       [DEFAULT]
                         n  = Where n=SUM(MVal)                       [See Below]
                      In general, all of the following performance metrics are collected
                      for each SQL module, along with a cumulative value representing
                      all SQL modules, when the SQLStats-flag is turned on:
                        MVal  Metric Name                   Metric Description
                        ----  ----------------------------  ----------------------------------
                         1    Query Execution Time          Total number of seconds elapsed
                         2    Total Global References       Total number of global references
                         4    Total Commands Executed       Total number of OS commands executed
                         8    Total Disk Read Latency Time  Total milliseconds spent waiting 
                        ====                                for Disk Reads
                         15   ALL                           Collect all Performance Metrics
                      This parameter provides a mechanism by which to choose a
                      combination of which performance metrics to collect, by specifying 
                      a SUM of the performance metrics MVal numbers (specified above) 
                      that you wish to collect.
                      EXAMPLE #1:
                      The following example represents the collection of 2 performance
                      metrics, 'Query Execution Time' & 'Total Disk Read Latency Time':
                        MVal  Metric Name
                        ----  ----------------------------
                         1    Query Execution Time
                        +8    Total Disk Read Latency Time
                        ===
                         9    Collect both of these performance metrics
                      By passing 9 for the value of the 'collectFlag' parameter, the
                      sum of the two aforementioned performance metrics MVal numbers,
                      the SQLStats PTool application will only collect statistical data 
                      for these two performance metrics whenever an SQL Query is invoked.
                      EXAMPLE #2:
                      The following example represents the collection of 3 performance
                      metrics, 'Query Execution Time', 'Total Global References' & 
                      'Total Commands Executed':
                        MVal  Metric Name
                        ----  ----------------------------
                         1    Query Execution Time
                         2    Total Global References
                        +4    Total Commands Executed
                        ===
                         7    Collect both of these performance metrics
                      By passing 7 for the value of the 'collectFlag' parameter, the
                      sum of the three aforementioned performance metrics MVal numbers,
                      the SQLStats PTool application will only collect statistical data 
                      for these two performance metrics whenever an SQL Query is invoked.
   terminateCond    - The portion of the SQLStats-flag which is represented by the 
                      5th colon (:) piece, and is determined by this parameter value.
                      An optional condition to determine when to terminate the SQLStats
                      collection, by turning off the SQLStats-flag (System), or by setting
                      it to a specified reset value.  This parameter accepts the following
                      values:
                         0       No Action                                              [DEFAULT]
                         M:
Method: SetSQLStatsFlag [SQL: StatsSQL_SetSQLStatsFlag] Replaces: N/A Status: New Functionality Purpose: See SetSQLStats() for details!
Method:       SetSQLStatsFlagByNS [SQL: StatsSQL_SetSQLStatsFlagByNS]
Replaces:     N/A
Status:       New Functionality
Purpose:      This method sets the flag that controls whether or not to collect 
              SQL Statistics about each run of a query within the given 'ns'
              (Namespace)
              You can invoke different levels of SQL Statistics collection by 
              setting the SQLStats-flag, for a given 'ns'.
              The SQLStats-flag (System) controls whether or not SQL Statistics 
              are collected for each SQL Query execution, and which performance
              statistics to be collected. 
              The SQLStats-flag is a colon (:) delimited string comprised of 
              the following individual components:
                 SQLStats-flag={action-flag}:{collect-flag}:{condition-flag}:{condition-value}:{terminate-flag}:{flag-type}
NOTE:         This method ONLY applies to the SQLStats-flag (System) for the 
              given 'ns' and NOT the SQLStats-flag (Process/Job)!
Invocation:   This method can be invoked in the following ways:
         Object Script: ##class(%SYS.PTools.StatsSQL).SetSQLStatsFlagByNS(...)
                        $SYSTEM.SQL.SetSQLStatsFlagByNS(...)
                   SQL: SELECT %SYS_PTools.StatsSQL_SetSQLStatsFlagByNS(...)
Examples:     The following examples shows the use of this method:
   #1         Turn PTools ON to collects stats for all SQL modules within the
              "USER" Namespace:
              set oldStats=##class(%SYS.PTools.StatsSQL).SetSQLStatsFlagByNS("USER",3)
Data Storage: N/A
Parameters:
   ns		        - The Namespace ($NAMESPACE) for which to set the SQLStats-flag
                          [REQUIRED]
   actionFlag       - The portion of the SQLStats-flag which is represented by the 
                      1st colon (:) piece, and can have one of the following values:
                          0 = Query Compilation: Don't generator SQLStats collection
                                                 code for any Query Modules
                              Query Execution:   Don't collect SQLStats for any Query 
                                                 Modules
                          1 = Query Compilation: Generator SQLStats collection code for 
                                                 MAIN Query Module (Start & Stop)
                              Query Execution:   Don't collect SQLStats for any Query 
                                                 Modules
                          2 = Query Compilation: Generator SQLStats collection code for 
                                                 MAIN Query Module (Start & Stop)
                              Query Execution:   Collect SQLStats for MAIN Query Module 
                                                 (Start & Stop)
                          3 = Query Compilation: Generator SQLStats collection code for 
                                                 ALL Query Modules
                              Query Execution:   Collect SQLStats for ALL Query Modules
   returnActionFlag - 0  = Return the entire SQLStats-flag value           [DEFAULT]
                      1  = Return only the {action-flag} value, which is the portion
                           of the SQLStats-flag represented by the 1st colon (:) piece
                           NOTE: This is the backward-compatible value
   collectFlag      - The portion of the SQLStats-flag which is represented by the 2nd 
                      colon (:) piece, and is a numeric value representing which SQL 
                      Performance Statistics/Metrics to collect, with one of the 
                      following values:
                         "" = Collect All SQL Performance Metrics                       [DEFAULT]
                         n  = Where n=SUM(MVal)                       [See Below]
                      In general, all of the following performance metrics are collected
                      for each SQL module, along with a cumulative value representing
                      all SQL modules, when the SQLStats-flag is turned on:
                        MVal  Metric Name                   Metric Description
                        ----  ----------------------------  ----------------------------------
                         1    Query Execution Time          Total number of seconds elapsed
                         2    Total Global References       Total number of global references
                         4    Total Commands Executed       Total number of OS commands executed
                         8    Total Disk Read Latency Time  Total milliseconds spent waiting 
                        ====                                for Disk Reads
                         15   ALL                           Collect all Performance Metrics
                      This parameter provides a mechanism by which to choose a
                      combination of which performance metrics to collect, by specifying 
                      a SUM of the performance metrics MVal numbers (specified above) 
                      that you wish to collect.
                      EXAMPLE #1:
                      The following example represents the collection of 2 performance
                      metrics, 'Query Execution Time' & 'Total Disk Read Latency Time':
                        MVal  Metric Name
                        ----  ----------------------------
                         1    Query Execution Time
                        +8    Total Disk Read Latency Time
                        ===
                         9    Collect both of these performance metrics
                      By passing 9 for the value of the 'collectFlag' parameter, the
                      sum of the two aforementioned performance metrics MVal numbers,
                      the SQLStats PTool application will only collect statistical data 
                      for these two performance metrics whenever an SQL Query is invoked.
                      EXAMPLE #2:
                      The following example represents the collection of 3 performance
                      metrics, 'Query Execution Time', 'Total Global References' & 
                      'Total Commands Executed':
                        MVal  Metric Name
                        ----  ----------------------------
                         1    Query Execution Time
                         2    Total Global References
                        +4    Total Commands Executed
                        ===
                         7    Collect both of these performance metrics
                      By passing 7 for the value of the 'collectFlag' parameter, the
                      sum of the three aforementioned performance metrics MVal numbers,
                      the SQLStats PTool application will only collect statistical data 
                      for these two performance metrics whenever an SQL Query is invoked.
   terminateCond    - The portion of the SQLStats-flag which is represented by the 
                      5th colon (:) piece, and is determined by this parameter value.
                      An optional condition to determine when to terminate the SQLStats
                      collection, by turning off the SQLStats-flag (System), or by setting
                      it to a specified reset value.  This parameter accepts the following
                      values:
                         0       No Action                                              [DEFAULT]
                         M:
Method: SetSQLStatsFlagByPID [SQL: StatsSQL_SetSQLStatsFlagByPID] Replaces: N/A Status: New Functionality Purpose: This method sets the flag that controls whether or not to collect SQL Statistics about each run of a query for the given 'pid' You can invoke different levels of SQL Statistics collection by setting the SQLStats-flag, for a given 'pid'. The SQLStats-flag (Process/Job) controls whether or not SQL Statistics are collected for each SQL Query execution, and which performance statistics to be collected. The SQLStats-flag is a colon (:) delimited string comprised of the following individual components: SQLStats-flag={action-flag}:{collect-flag}:{condition-flag}:{condition-value}:{terminate-flag}:{flag-type} NOTE: This method ONLY applies to the SQLStats-flag for the given 'pid' (Process/Job) and NOT the SQLStats-flag for the (System)! RESTRICTION: This method invocation requires %Admin_Operate:Use privilege Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.StatsSQL).SetSQLStatsFlagByPID(...) $SYSTEM.SQL.SetSQLStatsFlagByPID(...) SQL: SELECT %SYS_PTools.StatsSQL_SetSQLStatsFlagByPID(...) Examples: The following examples shows the use of this method: #1 Turn PTools ON to collects stats for all SQL modules for PID# 12345: set oldStats=##class(%SYS.PTools.StatsSQL).SetSQLStatsFlagByPID(12345,3) Data Storage: N/A Parameters: pid - The process ID ($JOB) for which to set the SQLStats-flag [DEFAULT: Current $JOB] actionFlag - The portion of the SQLStats-flag which is represented by the 1st colon (:) piece, and can have one of the following values: -1 = Query Compilation: Turn SQLStats Off for the given 'pid' Query Execution: Turn SQLStats Off for the given 'pid' 0 = Query Compilation: Use the {action-flag} (System) setting Query Execution: Use the {action-flag} (System) setting 1 = Query Compilation: Generator SQLStats collection code for MAIN Query Module (Start & Stop) Query Execution: Don't collect SQLStats for any Query Modules 2 = Query Compilation: Generator SQLStats collection code for MAIN Query Module (Start & Stop) Query Execution: Collect SQLStats for MAIN Query Module (Start & Stop) 3 = Query Compilation: Generator SQLStats collection code for ALL Query Modules Query Execution: Collect SQLStats for ALL Query Modules returnActionFlag - 0 = Return the entire SQLStats-flag value [DEFAULT] 1 = Return only the {action-flag} value, which is the portion of the SQLStats-flag represented by the 1st colon (:) piece NOTE: This is the backward-compatible value collectFlag - The portion of the SQLStats-flag which is represented by the 2nd colon (:) piece, and is a numeric value representing which SQL Performance Statistics/Metrics to collect, with one of the following values: "" = Collect All SQL Performance Metrics [DEFAULT] n = Where n=SUM(MVal) [See Below] In general, all of the following performance metrics are collected for each SQL module, along with a cumulative value representing all SQL modules, when the SQLStats-flag is turned on: MVal Metric Name Metric Description ---- ---------------------------- ---------------------------------- 1 Query Execution Time Total number of seconds elapsed 2 Total Global References Total number of global references 4 Total Commands Executed Total number of OS commands executed 8 Total Disk Read Latency Time Total milliseconds spent waiting ==== for Disk Reads 15 ALL Collect all Performance Metrics This parameter provides a mechanism by which to choose a combination of which performance metrics to collect, by specifying a SUM of the performance metrics MVal numbers (specified above) that you wish to collect. EXAMPLE #1: The following example represents the collection of 2 performance metrics, 'Query Execution Time' & 'Total Disk Read Latency Time': MVal Metric Name ---- ---------------------------- 1 Query Execution Time +8 Total Disk Read Latency Time === 9 Collect both of these performance metrics By passing 9 for the value of the 'collectFlag' parameter, the sum of the two aforementioned performance metrics MVal numbers, the SQLStats PTool application will only collect statistical data for these two performance metrics whenever an SQL Query is invoked. EXAMPLE #2: The following example represents the collection of 3 performance metrics, 'Query Execution Time', 'Total Global References' & 'Total Commands Executed': MVal Metric Name ---- ---------------------------- 1 Query Execution Time 2 Total Global References +4 Total Commands Executed === 7 Collect both of these performance metrics By passing 7 for the value of the 'collectFlag' parameter, the sum of the three aforementioned performance metrics MVal numbers, the SQLStats PTool application will only collect statistical data for these two performance metrics whenever an SQL Query is invoked. p5 - Placeholder Parameter for future extensibility ptInfo - A Pass By Reference information array that returns to the user detailed information in the following format: ptInfo(category,variable)=value NOTE: This method currently returns no 'ptInfo', but is included for future extensibility RETURN Value: The value of the SQLStats-flag before setting it to the new value; Otherwise, return an error message if an error occurred
Method: SetSQLStatsFlagJob [SQL: StatsSQL_SetSQLStatsFlagJob] Replaces: SetSQLStatsJob [SQL: StatsSQL_SetSQLStatsJob] Status: New Method to replicate Backward-Compatible Method it 'Replaces' Purpose: This method sets the flag that controls whether or not this Process/Job collects SQL Statistics about each run of a query You can invoke different levels of SQL Statistics collection by setting the SQLStats-flag, for your current Process/Job with this method. The SQLStats-flag controls whether or not SQL Statistics are collected for each SQL Query execution, and which performance statistics to collect. The SQLStats-flag is a colon (:) delimited string comprised of the following individual components: SQLStats-flag={action-flag}:{collect-flag}:{condition-flag}:{condition-value}:{terminate-flag}:{flag-type} Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.StatsSQL).SetSQLStatsFlagJob(...) $SYSTEM.SQL.SetSQLStatsFlagJob(...) SQL: SELECT %SYS_PTools.StatsSQL_SetSQLStatsFlagJob(...) Examples: The following examples shows the use of this method: #1 Turn PTools ON to collects stats for all SQL modules: set oldStats=##class(%SYS.PTools.StatsSQL).SetSQLStatsFlagJob(3) Data Storage: ^%SYS("sql","sys","SQLStats") Parameters: actionFlag - The portion of the SQLStats-flag which is represented by the 1st colon (:) piece, and can have one of the following values: -1 = Query Compilation: Turn SQLStats Off for this Process/Job Query Execution: Turn SQLStats Off for this Process/Job [-1 ONLY when flagType=1] 0 = Query Compilation: Use the {action-flag} (System) setting Query Execution: Use the {action-flag} (System) setting 1 = Query Compilation: Generator SQLStats collection code for MAIN Query Module (Start & Stop) Query Execution: Don't collect SQLStats for any Query Modules 2 = Query Compilation: Generator SQLStats collection code for MAIN Query Module (Start & Stop) Query Execution: Collect SQLStats for MAIN Query Module (Start & Stop) 3 = Query Compilation: Generator SQLStats collection code for ALL Query Modules Query Execution: Collect SQLStats for ALL Query Modules returnActionFlag - 0 = Return the entire SQLStats-flag value [DEFAULT] 1 = Return only the {action-flag} value, which is the portion of the SQLStats-flag represented by the 1st colon (:) piece NOTE: This is the backward-compatible value collectFlag - The portion of the SQLStats-flag which is represented by the 2nd colon (:) piece, and is a numeric value representing which SQL Performance Statistics/Metrics to collect, with one of the following values: "" = Collect All SQL Performance Metrics [DEFAULT] n = Where n=SUM(MVal) [See Below] In general, all of the following performance metrics are collected for each SQL module, along with a cumulative value representing all SQL modules, when the SQLStats-flag is turned on: MVal Metric Name Metric Description ---- ---------------------------- ---------------------------------- 1 Query Execution Time Total number of seconds elapsed 2 Total Global References Total number of global references 4 Total Commands Executed Total number of OS commands executed 8 Total Disk Read Latency Time Total milliseconds spent waiting ==== for Disk Reads 15 ALL Collect all Performance Metrics This parameter provides a mechanism by which to choose a combination of which performance metrics to collect, by specifying a SUM of the performance metrics MVal numbers (specified above) that you wish to collect. EXAMPLE #1: The following example represents the collection of 2 performance metrics, 'Query Execution Time' & 'Total Disk Read Latency Time': MVal Metric Name ---- ---------------------------- 1 Query Execution Time +8 Total Disk Read Latency Time === 9 Collect both of these performance metrics By passing 9 for the value of the 'collectFlag' parameter, the sum of the two aforementioned performance metrics MVal numbers, the SQLStats PTool application will only collect statistical data for these two performance metrics whenever an SQL Query is invoked. EXAMPLE #2: The following example represents the collection of 3 performance metrics, 'Query Execution Time', 'Total Global References' & 'Total Commands Executed': MVal Metric Name ---- ---------------------------- 1 Query Execution Time 2 Total Global References +4 Total Commands Executed === 7 Collect both of these performance metrics By passing 7 for the value of the 'collectFlag' parameter, the sum of the three aforementioned performance metrics MVal numbers, the SQLStats PTool application will only collect statistical data for these two performance metrics whenever an SQL Query is invoked. p4 - Placeholder Parameter for future extensibility ptInfo - A Pass By Reference information array that returns to the user detailed information in the following format: ptInfo(category,variable)=value Where category = { "current" | "terminate" | ... } variable = A variable that corresponds to the given 'category' Example: ptInfo("current","SQLStatsFlag")=The SQLStats-flag value after method execution RETURN Value: The value of the SQLStats-flag before setting it to the new value; Otherwise, return an error message if an error occurred
Method:       SetSQLStatsJob [SQL: StatsSQL_SetSQLStatsJob]
Replaces:     SetSQLStatsJob [SQL: SetSQLStatsJob]  (%SYS.PTools.SQLStats)  
Method:       SetSQLStatsSaveFlag [SQL: StatsSQL_SetSQLStatsSaveFlag]
Replaces:     N/A
Status:       New Functionality
Purpose:      This method sets the flag that controls what type of SQL 
              Statistics the System collects about each run of a query
              The SQLStatsSave-flag controls what type of SQL Statistics are 
              saved, either Optimal (new) or Original (backward-compatible).
              The SQLStatsSave-flag is a colon (:) delimited string comprised 
              of the following individual flags: {type-flag} & {method-flag}
Invocation:   This method can be invoked in the following ways:
                 ObjectScript: ##class(%SYS.PTools.StatsSQL).SetSQLStatsSaveFlag(...)
                        $SYSTEM.SQL.SetSQLStatsSaveFlag(...)
                   SQL: SELECT %SYS_PTools.StatsSQL_SetSQLStatsSaveFlag(...)
Examples:     The following examples shows the use of this method:
   #1         Set the PTools SQL Stats save flag (System) to 'Optimal'
              set oldFlag=##class(%SYS.PTools.StatsSQL).SetSQLStatsSaveFlag(1)
Data Storage: ^%SYS("sql","sys","SQLStatsSave")
Parameters:
   typeFlag      - 1 = Optimal (new)                            [DEFAULT]
                   2 = Original (backward-compatible)
[Optional Parameters]
   methodFlag    - 0 = Save the collected SQL Performance       [DEFAULT]
                       Statistics via SQL (SQL-Set)
                   1 = Save the collected SQL Performance 
                       Statistics via COS (Direct-Set)
                   NOTE: This parameter is only applicable when 'typeFlag=1'
                   
Method:       SetSQLStatsSaveFlagJob [SQL: StatsSQL_SetSQLStatsSaveFlagJob]
Replaces:     N/A
Status:       New Functionality
Purpose:      This method sets the flag that controls what type of SQL 
              Statistics this Process/Job collects about each run of a query
              The SQLStatsSave-flag controls what type of SQL Statistics are 
              saved, either Optimal (new) or Original (backward-compatible).
              The SQLStatsSave-flag is a colon (:) delimited string comprised 
              of the following individual flags: {type-flag} & {method-flag}
Invocation:   This method can be invoked in the following ways:
                 ObjectScript: ##class(%SYS.PTools.StatsSQL).SetSQLStatsSaveFlagJob(...)
                        $SYSTEM.SQL.SetSQLStatsSaveFlagJob(...)
                   SQL: SELECT %SYS_PTools.StatsSQL_SetSQLStatsSaveFlagJob(...)
Examples:     The following examples shows the use of this method:
   #1         Set the PTools SQL Stats save flag (Process/Job) to 'Optimal'
              set oldFlag=##class(%SYS.PTools.StatsSQL).SetSQLStatsSaveFlagJob(1)
Data Storage: N/A
Parameters:
   typeFlag      - 0 = Use the {type-flag} (System) value   [DEFAULT]
                   1 = Optimal (new)
                   2 = Original (backward-compatible)
[Optional Parameters]
   methodFlag    - 0 = Save the collected SQL Performance       [DEFAULT]
                       Statistics via SQL (SQL-Set)
                   1 = Save the collected SQL Performance 
                       Statistics via COS (Direct-Set)
                   NOTE: This parameter is only applicable when 'typeFlag=1'
                   
Method: aggregateSQLStats [SQL: PT_aggregateSQLStats] Replaces: N/A Status: New Functionality Purpose: This function aggregates all of the statistical properties for each SQL Query where data was collected Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.StatsSQL).aggregateSQLStats(...) SQL: CALL %SYS_PTools.PT_aggregateSQLStats(...) SELECT %SYS_PTools.PT_aggregateSQLStats(...) 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 Aggregate all of the statistical properties for the 'SAMPLES' namespace: set status=##class(%SYS.PTools.StatsSQL).aggregateSQLStats("SAMPLES") Data Storage: ^%sqlcq($NAMESPACE,"PTools","db","Stats{C|D|I|S|Z}") Parameters: ns - The namespace in which to aggregate SQL Statistics If none provided, spin through all namespaces where SQL Stats collected rtn - The routine in which to aggregate SQL Statistics If none provided, spin through all routines where SQL Stats collected curs - The cursor in which to aggregate SQL Statistics If none provided, spin through all cursor where SQL Stats collected Return: Error Status
Method:       buildPPcost
Replaces:     BuildPPcost (%SYS.PTools.SQLUtilities)  
Method:       changeCost
Replaces:     ChangeCost (%SYS.PTools.SQLUtilities)  
Method:       clearStatsSQL [SQL: PT_clearStatsSQL]
Replaces:     Purge [SQL: StatsSQL_Purge] (%SYS.PTools.SQLStats)  
Method: clearStatsSQLAllNS [SQL: PT_clearStatsSQLAllNS] Replaces: N/A Status: New Functionality Purpose: This method deletes all of the data stored in the '%SYS.PTools.StatsSQL' class in All Namespaces on a system for which the user has Write Privileges (Write infers Read), based on the optional 'rtn' parameter... This method clears SQLStats in all namespaces which are gathered when the SQLStats-flag is turned ON, a SQL Statement is invoked, and the SQLStats-flag is turned OFF, as in the following example: set SQLStatsJOB=$SYSTEM.SQL.SetSQLStatsFlagJob(3) // SQLStats-flag ON set sql($i(sql))="SELECT COUNT(*) FROM Sample.Person" // Use Dynamic SQL Query Interface (%SQL.Statement) to invoke // SQL Statement & collect SQLStats data: // %New() ... %Prepare(.sql) ... %Execute() ... %Next() ... %OnClose() set SQLStatsJOB=$SYSTEM.SQL.SetSQLStatsFlagJob(0) // SQLStats-flag OFF Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.StatsSQL).clearStatsSQLAllNS(...) SQL: CALL %SYS_PTools.PT_clearStatsSQLAllNS(...) SELECT %SYS_PTools.PT_clearStatsSQLAllNS(...) 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.StatsSQL' class in all namespaces on the system: set status=##class(%SYS.PTools.StatsSQL).clearStatsSQLAllNS() Data Storage: ^%sqlcq($NAMESPACE,"PTools","db","Stats{C|D|I|S|Z}") Parameters: rtn - The routine in which to clear SQL Statistics If none provided, clear all routines in all appropriate namespaces [OPTIONAL] ph2 - Placeholder Parameter for future extensibility ph3 - Placeholder Parameter for future extensibility clearAll - 0 = Perform a normal clear, but leave the 'INFO' rows 1 = Clear everything including the 'INFO' rows [DEFAULT: 0] 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 total number of Stats rows deleted from the following class, for each namespace: %SYS.PTools.StatsSQL [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","clearStatsSQLAllNS")=The number of rows deleted 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.StatsSQL
Method:       exportStatsSQL [SQL: PT_exportStatsSQL]
Replaces:     Export & ExportAll  (%SYS.PTools.SQLStats)  
Method:       getImportSchema [SQL: N/A]
Replaces:     ImportSchema (%SYS.PTools.SQLStats)  
Method:       getQueryText [SQL: N/A]
Replaces:     QueryText (%SYS.PTools.SQLStats)  
Method:       map
Replaces:     map (%SYS.PTools.SQLUtilities)  
ShowPlanAlt U T I L I T I E S ------------------------------
Method:       possiblePlans
Replaces:     PossiblePlans (%SYS.PTools.SQLUtilities)  
Method:       possiblePlansClose
Replaces:     PossiblePlansClose (%SYS.PTools.SQLUtilities)  
Method:       possiblePlansExecute
Replaces:     PossiblePlansExecute (%SYS.PTools.SQLUtilities)  
Method:       possiblePlansFetch
Replaces:     PossiblePlansFetch (%SYS.PTools.SQLUtilities)  
Method:       possiblePlansStatsClose
Replaces:     PossiblePlansStatsClose (%SYS.PTools.SQLUtilities)  
Method:       possiblePlansStatsExecute
Replaces:     PossiblePlansStatsExecute (%SYS.PTools.SQLUtilities)  
Method:       possiblePlansStatsFetch
Replaces:     PossiblePlansStatsFetch (%SYS.PTools.SQLUtilities)  
Queries
SELECT ID, NameSpace, RoutineName, CursorName, StatsGroup, ModuleName, QueryCompileTime, StartTime, ImportSchema, UserName, ExeName, MachineName, IPAddress, Pid, SQLStatsFlag, CASE WHEN $PIECE(SQLStatsFlag, ':', 1)=3 THEN 1 ELSE 0 END AS Details, CASE WHEN ModuleName = -1 AND %SYS_PTools.PT_useAggregatedData(NameSpace, RoutineName, CursorName)=1 THEN TotalRowCount WHEN ModuleName = -1 THEN (SELECT SUM(RowCount) FROM %SYS_PTools.StatsSQL AS sqSSQL WHERE sqSSQL.NameSpace = SSQL.NameSpace AND sqSSQL.RoutineName = SSQL.RoutineName AND sqSSQL.CursorName = SSQL.CursorName AND ModuleName = 0 ) ELSE RowCount END AS RowCount, CASE WHEN ModuleName = -1 AND %SYS_PTools.PT_useAggregatedData(NameSpace, RoutineName, CursorName)=1 THEN TotalCounter WHEN ModuleName = -1 THEN (SELECT SUM(Counter) FROM %SYS_PTools.StatsSQL AS sqSSQL WHERE sqSSQL.NameSpace = SSQL.NameSpace AND sqSSQL.RoutineName = SSQL.RoutineName AND sqSSQL.CursorName = SSQL.CursorName AND ModuleName = 0 ) ELSE Counter END AS RunCount, CASE WHEN ModuleName = -1 AND %SYS_PTools.PT_useAggregatedData(NameSpace, RoutineName, CursorName)=1 THEN TotalModuleCount WHEN ModuleName = -1 THEN (SELECT SUM(ModuleCount) FROM %SYS_PTools.StatsSQL AS sqSSQL WHERE sqSSQL.NameSpace = SSQL.NameSpace AND sqSSQL.RoutineName = SSQL.RoutineName AND sqSSQL.CursorName = SSQL.CursorName AND ModuleName = 0 ) ELSE Counter END AS ModuleCount, CASE WHEN ModuleName = -1 AND %SYS_PTools.PT_useAggregatedData(NameSpace, RoutineName, CursorName)=1 THEN TotalTimeToFirstRow WHEN ModuleName = -1 THEN (SELECT SUM(TimeToFirstRow) FROM %SYS_PTools.StatsSQL AS sqSSQL WHERE sqSSQL.NameSpace = SSQL.NameSpace AND sqSSQL.RoutineName = SSQL.RoutineName AND sqSSQL.CursorName = SSQL.CursorName AND ModuleName = 0 ) ELSE TimeToFirstRow END AS TimeToFirstRow, CASE WHEN ModuleName = -1 AND %SYS_PTools.PT_useAggregatedData(NameSpace, RoutineName, CursorName)=1 THEN TotalTimeSpent WHEN ModuleName = -1 THEN (SELECT SUM(TimeSpent) FROM %SYS_PTools.StatsSQL AS sqSSQL WHERE sqSSQL.NameSpace = SSQL.NameSpace AND sqSSQL.RoutineName = SSQL.RoutineName AND sqSSQL.CursorName = SSQL.CursorName AND ModuleName = 0 ) ELSE TimeSpent END AS TimeSpent, CASE WHEN ModuleName = -1 AND %SYS_PTools.PT_useAggregatedData(NameSpace, RoutineName, CursorName)=1 THEN TotalGlobalRefs WHEN ModuleName = -1 THEN (SELECT SUM(GlobalRefs) FROM %SYS_PTools.StatsSQL AS sqSSQL WHERE sqSSQL.NameSpace = SSQL.NameSpace AND sqSSQL.RoutineName = SSQL.RoutineName AND sqSSQL.CursorName = SSQL.CursorName AND ModuleName = 0 ) ELSE GlobalRefs END AS GlobalRefs, CASE WHEN ModuleName = -1 AND %SYS_PTools.PT_useAggregatedData(NameSpace, RoutineName, CursorName)=1 THEN TotalCommandsExecuted WHEN ModuleName = -1 THEN (SELECT SUM(CommandsExecuted) FROM %SYS_PTools.StatsSQL AS sqSSQL WHERE sqSSQL.NameSpace = SSQL.NameSpace AND sqSSQL.RoutineName = SSQL.RoutineName AND sqSSQL.CursorName = SSQL.CursorName AND ModuleName = 0 ) ELSE CommandsExecuted END AS CommandsExecuted, CASE WHEN ModuleName = -1 AND %SYS_PTools.PT_useAggregatedData(NameSpace, RoutineName, CursorName)=1 THEN TotalDiskWait WHEN ModuleName = -1 THEN (SELECT SUM(DiskWait) FROM %SYS_PTools.StatsSQL AS sqSSQL WHERE sqSSQL.NameSpace = SSQL.NameSpace AND sqSSQL.RoutineName = SSQL.RoutineName AND sqSSQL.CursorName = SSQL.CursorName AND ModuleName = 0 ) ELSE DiskWait END AS DiskWait, QueryType, QueryText, Parameters FROM %SYS_PTools.StatsSQL AS SSQL
Query:        StatsSQLView [SQL: StatsSQLView]
Replaces:     SQLStatsView [SQL: SQLStatsView]  (%SYS.PTools.SQLStats)  
SELECT * FROM %SYS_PTools.StatsSQL_ViewStatsSQL(:NameSpace)
SELECT * FROM %SYS_PTools.StatsSQL_ViewStatsSQLDetails(:CursorName, :RoutineName)
SELECT RoutineName, QueryText, RunCount, {fn round(RowCount/RunCount, 2)} AS AvgRows, {fn round(GlobalRefs/RunCount, 2)} AS AvgGlorefs, {fn round(DiskWait/RunCount, 2)} AS AvgDiskWait, {fn round(CommandsExecuted/RunCount, 2)} AS AvgCommands, {fn round(TimeSpent/RunCount, 5)} AS AvgTime, Details, CursorName, RoutineName||'^'||CursorName AS RoutineCursor, ImportSchema FROM %SYS_PTools.StatsSQLView Main WHERE (Namespace = :ns OR :ns IS NULL) AND ModuleName = -1 /* 'INFO' */ ORDER BY NameSpace, RoutineName, CursorName, StatsGroup
Query:        ViewStatsSQL [SQL: StatsSQLView]
Replaces:     ViewStats [SQL: ViewStats]  (%SYS.PTools.SQLStats)  
SELECT QueryText, RunCount, CASE WHEN ModuleName = -1 /* 'INFO' */ THEN {fn round(RowCount/RunCount, 2)} ELSE {fn round(RowCount, 2)} END AS AvgRows, CASE WHEN ModuleName = -1 /* 'INFO' */ THEN {fn round(GlobalRefs/RunCount, 2)} ELSE {fn round(GlobalRefs, 2)} END AS AvgGlorefs, CASE WHEN ModuleName = -1 /* 'INFO' */ THEN {fn round(DiskWait/RunCount, 2)} ELSE {fn round(DiskWait, 2)} END AS AvgDiskWait, CASE WHEN ModuleName = -1 /* 'INFO' */ THEN {fn round(CommandsExecuted/RunCount, 2)} ELSE {fn round(CommandsExecuted, 2)} END AS AvgCommands, CASE WHEN ModuleName = -1 /* 'INFO' */ THEN {fn round(TimeSpent/RunCount, 5)} ELSE {fn round(TimeSpent, 5)} END AS AvgTime, %External(ModuleName), CASE WHEN ModuleName = -1 /* 'INFO' */ THEN {fn round(ModuleCount/RunCount, 2)} ELSE {fn round(ModuleCount, 2)} END AS AvgModCount FROM %SYS_PTools.StatsSQLView WHERE CursorName = :curs AND RoutineName = :rtn
Query:        ViewStatsSQLDetails [SQL: ViewStatsSQLDetails
Replaces:     ViewStatsDetails [SQL: ViewStatsDetails  (%SYS.PTools.SQLStats)  
Query:        possiblePlans [SQL: PT_possiblePlans]
Replaces:     PossiblePlans [SQL: PossiblePlans]  (%SYS.PTools.SQLUtilities)  
Query:        possiblePlansStats [SQL: PT_possiblePlansStats]
Replaces:     PossiblePlansStats [SQL: PossiblePlansStats]  (%SYS.PTools.SQLUtilities)  
Triggers
Inherited Members
Inherited Properties
- CommandsExecuted
- Counter
- DiskWait
- ExeName
- GlobalRefs
- IPAddress
- LinesOfCode
- MachineName
- ModuleCount
- Pid
- RoutineInfo
- RowCount
- StartTime
- TimeSpent
- TimeToFirstRow
- TotalTime
- UserName
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()
- CSVtabHead()
- CSVtabRow()
- DLMtabHead()
- DLMtabRow()
- HTMLtabHead()
- HTMLtabRow()
- Report()
- Start()
- Stop()
- TXTtabHead()
- TXTtabRow()
- XMLcolAuto()
- XMLcolWidth()
- XMLrowHeader()
- XMLsheet()
- XMLsort()
- XMLtabRow()
- XMLtable()
- clearPToolsError()
- clearStats()
- clearStatsALL()
- clearStatsAllNS()
- clearStatsSQLALL()
- clearStatsSQLIndexALL()
- clearStatsSQLIndexNEW()
- clearStatsSQLIndexOLD()
- clearStatsSQLNEW()
- clearStatsSQLOLD()
- condsMatch()
- createAndOpenFile()
- createOrderByList()
- exportStats()
- fileBody()
- fileFooter()
- fileHeader()
- getOutputFile()
- getPToolsError()
- openFileForRead()
Storage
Gray indicates storage defined by superclasses.
Storage Model: Storage (%SYS.PTools.Stats)
| ^%sqlcq($NAMESPACE,"PTools","db","StatsD")(ID) | = | %%CLASSNAME Counter RowCount GlobalRefs CommandsExecuted TimeSpent StartTime UserName IPAddress MachineName ExeName ModuleCount RoutineInfo TimeToFirstRow Pid DiskWait | 
Storage Model: Storage (%SYS.PTools.StatsSQL)
| ^%sqlcq($NAMESPACE,"PTools","db","StatsD")(ID,"StatsSQL") | = | QueryType ImportSchema SQLTextRaw Hash SQLIndexHash QueryCompileTime Parameters SQLStatsFlag TotalRowCount TotalCounter TotalModuleCount TotalTimeToFirstRow TotalTimeSpent TotalGlobalRefs TotalCommandsExecuted TotalDiskWait VarianceTimeSpent creationDate creationTime RoutineNameUCQCaller |