Database | View | Application | Created | Links |
sybsystemprocs | sysquerymetrics | 31 Aug 14 | Defects Schema ColumnUsage Queries Dependencies |
1 create view sysquerymetrics(uid, gid, hashkey, id, sequence, exec_min, exec_max, exec_avg, elap_min, elap_max, elap_avg, lio_min, lio_max, lio_avg, pio_min, pio_max, pio_avg, cnt, abort_cnt, qtext) as select a.uid, - a.gid, a.hashkey, a.id, a.sequence, convert(int, substring(b.text, charindex('e1', b.text) + 3, charindex('e2', b.text) - charindex('e1', b.text) - 4)), convert(int, substring(b.text, charindex('e2', b.text) + 3, charindex('e3', b.text) - charindex('e2', b.text) - 4)), convert(int, substring(b.text, charindex('e3', b.text) + 3, charindex('t1', b.text) - charindex('e3', b.text) - 4)), convert(int, substring(b.text, charindex('t1', b.text) + 3, charindex('t2', b.text) - charindex('t1', b.text) - 4)), convert(int, substring(b.text, charindex('t2', b.text) + 3, charindex('t3', b.text) - charindex('t2', b.text) - 4)), convert(int, substring(b.text, charindex('t3', b.text) + 3, charindex('l1', b.text) - charindex('t3', b.text) - 4)), convert(int, substring(b.text, charindex('l1', b.text) + 3, charindex('l2', b.text) - charindex('l1', b.text) - 4)), convert(int, substring(b.text, charindex('l2', b.text) + 3, charindex('l3', b.text) - charindex('l2', b.text) - 4)), convert(int, substring(b.text, charindex('l3', b.text) + 3, charindex('p1', b.text) - charindex('l3', b.text) - 4)), convert(int, substring(b.text, charindex('p1', b.text) + 3, charindex('p2', b.text) - charindex('p1', b.text) - 4)), convert(int, substring(b.text, charindex('p2', b.text) + 3, charindex('p3', b.text) - charindex('p2', b.text) - 4)), convert(int, substring(b.text, charindex('p3', b.text) + 3, charindex('c', b.text) - charindex('p3', b.text) - 4)), convert(int, substring(b.text, charindex('c', b.text) + 2, charindex('ac', b.text) - charindex('c', b.text) - 3)), convert(int, substring(b.text, charindex('ac', b.text) + 3, char_length(b.text) - charindex('ac', b.text) - 2)), a.text from sysqueryplans a, sysqueryplans b where (a.type = 10) and (b.type = 1000) and (a.id = b.id) and a.uid = b.uid and a.gid = b.gid
DEFECTS | |
QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int | 1 |
MGTP 3 Grant to public sybsystemprocs..sysqueryplans | |
QNAJ 3 Not using ANSI Inner Join | 1 |
QPRI 3 Join or Sarg with Rooted Partial Index Use JOIN Candidate index: sysqueryplans.csysqueryplans unique clustered (uid, gid, hashkey, id, type, sequence) Intersection: {uid, id, gid} Uncovered: [hashkey, sequence] | 1 |
MTR1 2 Metrics: Comments Ratio Comments: 0% | 1 |
MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 5 = 4dec - 1exi + 2 | 1 |
MTR3 2 Metrics: Query Complexity Complexity: 8 | 1 |
PRED_QUERY_COLLECTION 2 {q=sybsystemprocs..sysqueryplans, q2=sybsystemprocs..sysqueryplans} 0 | 1 |
SCHEMA |
COLUMN USAGE | |
gid | sp_show_metrics |
sequence | sp_show_metrics |
QUERIES | |
Joined With | Links |
DEPENDENCIES |
SUB TABLES reads table sybsystemprocs..sysqueryplans READERS AND WRITERS read by proc sybsystemprocs..sp_show_metrics called by proc sybsystemprocs..sp_metrics |