DatabaseProcApplicationCreatedLinks
sybsystemprocssp_show_metrics  14 déc. 14Defects Propagation Dependencies

1     
2     /* Sccsid = "%Z% generic/sproc/%M% %I% %G%" */
3     
4     /*
5     ** sp_show_metrics
6     **
7     ** Display information in metrics groups
8     ** Requires Galaxy or later
9     **
10    */
11    
12    create or replace procedure sp_show_metrics
13    as
14    
15        select gid 'Group ID', count(*) '#Metrics'
16        from sysquerymetrics
17        where sequence = 0
18        group by gid
19        order by gid
20    
21        return (0)
22    


exec sp_procxmode 'sp_show_metrics', 'AnyMode'
go

Grant Execute on sp_show_metrics to public
go
RESULT SETS
sp_show_metrics_rset_001

DEFECTS
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: sysquerymetrics.csysqueryplans_sysqueryplans unique clustered
(uid, gid, hashkey, id, sequence)
Intersection: {sequence}
17
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 17
 MGTP 3 Grant to public sybsystemprocs..sp_show_metrics  
 MUCO 3 Useless Code Useless Brackets 21
 MRST 2 Result Set Marker 15
 MTR1 2 Metrics: Comments Ratio Comments: 27% 12
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 2 = 1dec - 1exi + 2 12
 MTR3 2 Metrics: Query Complexity Complexity: 5 12

DEPENDENCIES
PROCS AND TABLES USED
reads view sybsystemprocs..sysquerymetrics  
   reads table sybsystemprocs..sysqueryplans  
writes table sybsystemprocs..sp_show_metrics_rset_001 

CALLERS
called by proc sybsystemprocs..sp_metrics