91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

外鍵缺索引檢查腳本

發布時間:2020-08-12 08:28:04 來源:ITPUB博客 閱讀:166 作者:xypincle 欄目:大數據

  • --以ZLHIS用戶執行
  • Select Child_Table, Foreign_Key,
  •        Cname1 || Nvl2(Cname2, ',' || Cname2, Null) || Nvl2(Cname3, ',' || Cname3, Null) ||
  •         Nvl2(Cname4, ',' || Cname4, Null) || Nvl2(Cname5, ',' || Cname5, Null) || Nvl2(Cname6, ',' || Cname6, Null) ||
  •         Nvl2(Cname7, ',' || Cname7, Null) || Nvl2(Cname8, ',' || Cname8, Null) Columns, Main_Table, Primary_Key,
  •        Decode(p.Table_Name, Null, 0, 1) Key_Rows
  • From (Select Col_Cnt, Main_Table, Primary_Key, Child_Table, Foreign_Key,
  •               Cname1 || Nvl2(Cname2, ',' || Cname2, Null) || Nvl2(Cname3, ',' || Cname3, Null) ||
  •                Nvl2(Cname4, ',' || Cname4, Null) || Nvl2(Cname5, ',' || Cname5, Null) || Nvl2(Cname6, ',' || Cname6, Null) ||
  •                Nvl2(Cname7, ',' || Cname7, Null) || Nvl2(Cname8, ',' || Cname8, Null) As Columns, Cname1, Cname2, Cname3,
  •               Cname4, Cname5, Cname6, Cname7, Cname8
  •        From (Select c.Table_Name As Main_Table, b.r_Constraint_Name As Primary_Key, b.Table_Name As Child_Table,
  •                      b.Constraint_Name As Foreign_Key, Max(Decode(Position, 1, Column_Name, Null)) Cname1,
  •                      Max(Decode(Position, 2, Column_Name, Null)) Cname2, Max(Decode(Position, 3, Column_Name, Null)) Cname3,
  •                      Max(Decode(Position, 4, Column_Name, Null)) Cname4, Max(Decode(Position, 5, Column_Name, Null)) Cname5,
  •                      Max(Decode(Position, 6, Column_Name, Null)) Cname6, Max(Decode(Position, 7, Column_Name, Null)) Cname7,
  •                      Max(Decode(Position, 8, Column_Name, Null)) Cname8, Count(*) Col_Cnt
  •               From User_Cons_Columns A, User_Constraints B, User_Constraints C
  •               Where a.Constraint_Name = b.Constraint_Name And b.Status = 'ENABLED' And b.Constraint_Type = 'R' And
  •                b.r_Constraint_Name <> '部門表_PK' And b.r_Constraint_Name = c.Constraint_Name And
  •                c.Table_Name Not In (Select 表名 From zlBaseCode)
  •               Group By c.Table_Name, b.Table_Name, b.Constraint_Name, b.r_Constraint_Name)) Cons, User_Tab_Statistics S,
  •      (Select Table_Name
  •        From User_Tables
  •        Where Table_Name In (Select 表名 From zlBakTables Union All Select 表名 From Zlbigtables) Or Table_Name Like '%病人%') P
  • Where Cons.Child_Table = s.Table_Name(+) And Cons.Main_Table = p.Table_Name(+) And Not Exists
  •  (Select 1
  •        From (Select Table_Name,
  •                      Cname1 || Nvl2(Cname2, ',' || Cname2, Null) || Nvl2(Cname3, ',' || Cname3, Null) ||
  •                       Nvl2(Cname4, ',' || Cname4, Null) || Nvl2(Cname5, ',' || Cname5, Null) ||
  •                       Nvl2(Cname6, ',' || Cname6, Null) || Nvl2(Cname7, ',' || Cname7, Null) ||
  •                       Nvl2(Cname8, ',' || Cname8, Null) As Columns
  •               From (Select i.Table_Name, Max(Decode(Column_Position, 1, Column_Name, Null)) Cname1,
  •                             Max(Decode(Column_Position, 2, Column_Name, Null)) Cname2,
  •                             Max(Decode(Column_Position, 3, Column_Name, Null)) Cname3,
  •                             Max(Decode(Column_Position, 4, Column_Name, Null)) Cname4,
  •                             Max(Decode(Column_Position, 5, Column_Name, Null)) Cname5,
  •                             Max(Decode(Column_Position, 6, Column_Name, Null)) Cname6,
  •                             Max(Decode(Column_Position, 7, Column_Name, Null)) Cname7,
  •                             Max(Decode(Column_Position, 8, Column_Name, Null)) Cname8
  •                      From User_Ind_Columns I, User_Indexes A, User_Constraints B
  •                      Where a.Index_Name = i.Index_Name And a.Status = 'VALID' And i.Table_Name = b.Table_Name And
  •                            b.Constraint_Type = 'R' And b.r_Constraint_Name <> '部門表_PK'
  •                      Group By i.Table_Name, i.Index_Name)) Inds
  •        Where Instr(',' || Inds.Columns, ',' || Cons.Columns) = 1 And Cons.Child_Table = Inds.Table_Name)
  • Order By Key_Rows Desc, s.Num_Rows Desc Nulls Last

  • 向AI問一下細節

    免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

    AI

    阿瓦提县| 衡东县| 龙胜| 五华县| 宁南县| 那曲县| 怀集县| 高青县| 馆陶县| 安岳县| 绩溪县| 思茅市| 庆元县| 芦山县| 延边| 枣强县| 西华县| 兰州市| 惠东县| 乌鲁木齐县| 南昌市| 华容县| 宁阳县| 临沭县| 芦溪县| 梅河口市| 吉安市| 阜宁县| 鸡东县| 永吉县| 中西区| 邛崃市| 武冈市| 长治县| 普宁市| 齐河县| 石楼县| 江油市| 邢台县| 乐安县| 美姑县|