首页 > 其他分享 >索引定位使用案例-类型转换

索引定位使用案例-类型转换

时间:2024-04-12 22:13:37浏览次数:26  
标签:类型转换 CODE IDX 案例 SECDATA 索引 num exp 362

sql

select count(0) from (select distinct cc.*,
                to_char(a1.D_DEALDATE, 'yyyy-MM-dd') D_DEALDATE,
                a1.C_DATA_IDF,
                trim(a1.C_FIELD7) ZQFL,
                trim(a1.C_FIELD8) C_FIELD8,
                trim(to_char(a1.D_FIELD1, 'yyyy-MM-dd')) DQR,
                trim(a1.C_FIELD11) RATE,
                trim(a1.C_FIELD12) JXFS,
                trim(a2.C_FIELD8) ZQFLCSZNAME
  from (select c.C_PORT_CODE,
               c.C_FIELD1,
               c.N_AMOUNT,
               c.C_SEC_NAME,
               nvl(trim(c1.N_AMOUNT), 0) QYRCCSL
          from (select c.C_PORT_CODE, c.C_FIELD1, c.N_AMOUNT, s.C_SEC_NAME
                  from T_M_T_ZQCC  index IDX_M_T_ZQCC1  c
                  left join T_M_T_SECINFO index IDX_M_T_SECINFO1 s
                    on c.C_SEC_CODE = s.C_SEC_MKT_CODE
                   and c.C_SEC_VAR_CODE = s.C_SEC_VAR_CODE
                   and c.C_MKT_CODE = s.C_MKT_CODE
                   and s.N_CHECK_STATE = 1
                 where c.C_DATA_IDF = 'CC_SRC_GP3_VIEW'
                   and c.D_STOCK = to_date('2024-04-08', 'yyyy-MM-dd')
                   and c.C_PORT_CODE = 'BI0111'
                   and c.N_CHECK_STATE =1-- '1' 
                   and c.C_FIELD2 NOT IN ('MPLIV', 'PPLIV')
                   and c.C_SEC_VAR_CODE LIKE 'ZQ%') c
          left join (select C_PORT_CODE, C_FIELD1, N_AMOUNT
                      from T_M_T_ZQCC    index IDX_M_T_ZQCC1
                     where C_DATA_IDF = 'CC_SRC_GP3_VIEW'
                       and D_STOCK = to_date('2024-04-07', 'yyyy-MM-dd')
                       and C_PORT_CODE = 'BI0111'
                       and N_CHECK_STATE =  '1'
                       and C_FIELD2 NOT IN ('MPLIV', 'PPLIV')
                       and C_SEC_VAR_CODE LIKE 'ZQ%') c1
            on c.C_PORT_CODE = c1.C_PORT_CODE
           and c.C_FIELD1 = c1.C_FIELD1) cc
  left join (select D_DEALDATE,
                    C_DATA_IDF,
                    C_FIELD7,
                    C_FIELD8,
                    D_FIELD1,
                    C_FIELD11,
                    C_FIELD12,
                    C_FIELD1,
                    'OCR\' || C_FIELD7 || '\' || C_FIELD8 AS TEMP
               from T_M_T_SECDATA
              where D_DEALDATE = to_date('2024-04-08', 'yyyy-MM-dd')
                and C_DATA_IDF = 'ZSJ_SRC_ZQFL_GP3'
                and C_FIELD7 in ('AIBN', 'APBN', 'TVAS')
                and N_CHECK_STATE = 1
             union all
             select D_DEALDATE,
                    C_DATA_IDF,
                    C_FIELD7,
                    C_FIELD8,
                    D_FIELD1,
                    C_FIELD11,
                    C_FIELD12,
                    C_FIELD1,
                    'OCR\' || C_FIELD7 || '\' || C_FIELD8 AS TEMP
               from T_M_T_SECDATA
              where D_DEALDATE = to_date('2024-04-08', 'yyyy-MM-dd')-1
                and C_DATA_IDF = 'ZSJ_SRC_ZQFL_GP3'
                and C_FIELD7 in ('AIBN', 'APBN', 'TVAS')
                and N_CHECK_STATE = 1
                union all
                select D_DEALDATE,
                    C_DATA_IDF,
                    C_FIELD7,
                    C_FIELD8,
                    D_FIELD1,
                    C_FIELD11,
                    C_FIELD12,
                    C_FIELD1,
                    null AS TEMP
               from T_M_T_SECDATA
              where D_DEALDATE = to_date('2024-04-08', 'yyyy-MM-dd')
                and C_DATA_IDF = 'ZSJ_SRC_GDLLB_GP3'
                and C_FIELD8 = 'FIX'
                and N_CHECK_STATE = 1
                union all
                select D_DEALDATE,
                    C_DATA_IDF,
                    C_FIELD7,
                    C_FIELD8,
                    D_FIELD1,
                    C_FIELD11,
                    C_FIELD12,
                    C_FIELD1,
                    null AS TEMP
               from T_M_T_SECDATA
              where D_DEALDATE = to_date('2024-04-08', 'yyyy-MM-dd')-1
                and C_DATA_IDF = 'ZSJ_SRC_GDLLB_GP3'
                and C_FIELD8 = 'FIX'
                and N_CHECK_STATE = 1
                ) a1
    on cc.C_FIELD1 = a1.C_FIELD1
  left join T_M_T_SECDATA a2
    on a2.C_FIELD7 = a1.temp
   and a1.D_DEALDATE = a2.D_DEALDATE
   and a2.N_CHECK_STATE = '1'
   and a2.C_DATA_IDF = 'ZSJ_SRC_ZQFLCSZ_GP3') tmp_count

CREATE  INDEX "IDX_M_T_ZQCC1" ON "OCP"."T_M_T_ZQCC"("C_DATA_IDF" ASC,"D_STOCK" ASC,"C_PORT_CODE" ASC,"N_CHECK_STATE" ASC,"C_FIELD1" ASC,"C_SEC_VAR_CODE" ASC) STORAGE(ON "OCP", CLUSTERBTR) ;      
CREATE  INDEX "IDX_M_T_SECDATA4" ON "OCP"."T_M_T_SECDATA"("D_DEALDATE"  ,"C_DATA_IDF" ASC,"N_CHECK_STATE" ASC,"C_FIELD7" ASC ) online parallel 16

N_CHECK_STATE 为字符串类型,传值为数值类型。

执行计划

1   #NSET2: [6, 1, 1120] 
2     #PRJT2: [6, 1, 1120]; exp_num(1), is_atom(FALSE) 
3       #AAGR2: [6, 1, 1120]; grp_num(0), sfun_num(1), distinct_flag[0]; slave_empty(0)
4         #PRJT2: [6, 1, 1120]; exp_num(0), is_atom(FALSE) 
5           #DISTINCT: [6, 1, 1120]
6             #PRJT2: [5, 3, 1120]; exp_num(13), is_atom(FALSE) 
7               #INDEX JOIN LEFT JOIN2: [5, 3, 1120]  ret_null(0)
8                 #HASH LEFT JOIN2: [4, 3, 1120]; key_num(1), partition_keys_num(0), ret_null(0), mix(0) KEY(CC.C_FIELD1=A1.C_FIELD1)
9                   #PRJT2: [1, 1, 758]; exp_num(5), is_atom(FALSE) 
10                    #NEST LOOP LEFT JOIN2: [1, 1, 758]; join condition((C.C_PORT_CODE = C1.C_PORT_CODE AND C.C_FIELD1 = C1.C_FIELD1))[with var] partition_keys_num(0) ret_null(0)
11                      #PRJT2: [1, 1, 427]; exp_num(4), is_atom(FALSE) 
12                        #INDEX JOIN LEFT JOIN2: [1, 1, 427] join condition((C.C_SEC_VAR_CODE = S.C_SEC_VAR_CODE AND exp_cast(S.N_CHECK_STATE) = 1)) ret_null(0)
13                          #PARALLEL: [1, 1, 427]; scan_type(EQU), key_num(1, 0, 0), simple(0)
14                            #HASH RIGHT SEMI JOIN2: [1, 1, 427]; n_keys(1) (ANTI), KEY(DMTEMPVIEW_891038964.colname=C.C_FIELD2) KEY_NULL_EQU(0)
15                              #CONST VALUE LIST: [1, 2, 48]; row_num(2), col_num(1), 
16                              #BLKUP2: [1, 1, 427]; IDX_M_T_ZQCC1(C)
17                                #SLCT2: [1, 1, 427]; (C.C_SEC_VAR_CODE >= 'ZQ' AND C.C_SEC_VAR_CODE < 'ZR' AND exp_cast(C.N_CHECK_STATE) = 1)
18                                  #SSEK2: [1, 1, 427]; scan_type(ASC), IDX_M_T_ZQCC1(T_M_T_ZQCC as C), scan_range[('CC_SRC_GP3_VIEW',exp11,'BI0111',min,min,min),('CC_SRC_GP3_VIEW',exp11,'BI0111',max,max,max))
19                          #BLKUP2: [1, 1, 96]; IDX_M_T_SECINFO1(S)
20                            #SSEK2: [1, 1, 96]; scan_type(ASC), IDX_M_T_SECINFO1(T_M_T_SECINFO as S), scan_range[(C.C_SEC_CODE,C.C_MKT_CODE),(C.C_SEC_CODE,C.C_MKT_CODE)]
21                      #PRJT2: [1, 1, 331]; exp_num(3), is_atom(FALSE) 
22                        #PARALLEL: [1, 1, 331]; scan_type(EQU), key_num(1, 0, 0), simple(0)
23                          #HASH RIGHT SEMI JOIN2: [1, 1, 331]; n_keys(1) (ANTI), KEY(DMTEMPVIEW_891038965.colname=T_M_T_ZQCC.C_FIELD2) KEY_NULL_EQU(0)
24                            #CONST VALUE LIST: [1, 2, 48]; row_num(2), col_num(1), 
25                            #BLKUP2: [1, 1, 331]; IDX_M_T_ZQCC1(T_M_T_ZQCC)
26                              #SLCT2: [1, 1, 331]; (T_M_T_ZQCC.C_SEC_VAR_CODE >= 'ZQ' AND T_M_T_ZQCC.C_SEC_VAR_CODE < 'ZR' AND exp_cast(T_M_T_ZQCC.N_CHECK_STATE) = 1 AND T_M_T_ZQCC.C_PORT_CODE = var6 AND T_M_T_ZQCC.C_FIELD1 = var7)
27                                #SSEK2: [1, 1, 331]; scan_type(ASC), IDX_M_T_ZQCC1(T_M_T_ZQCC), scan_range[('CC_SRC_GP3_VIEW',exp11,'BI0111',min,min,min),('CC_SRC_GP3_VIEW',exp11,'BI0111',max,max,max))
28                  #PRJT2: [2, 4, 362]; exp_num(9), is_atom(FALSE) 
29                    #UNION ALL: [2, 4, 362]
30                      #PRJT2: [1, 3, 362]; exp_num(9), is_atom(FALSE) 
31                        #UNION ALL: [1, 3, 362]
32                          #PRJT2: [1, 2, 362]; exp_num(9), is_atom(FALSE) 
33                            #UNION ALL: [1, 2, 362]
34                              #PRJT2: [1, 1, 362]; exp_num(9), is_atom(FALSE) 
35                                #BLKUP2: [1, 1, 362]; IDX_M_T_SECDATA4(T_M_T_SECDATA)
36                                  #SLCT2: [1, 1, 362]; (T_M_T_SECDATA.C_FIELD7 IN LIST AND exp_cast(T_M_T_SECDATA.N_CHECK_STATE) = 1)
37                                    #SSEK2: [1, 1, 362]; scan_type(ASC), IDX_M_T_SECDATA4(T_M_T_SECDATA), scan_range[(exp11,'ZSJ_SRC_ZQFL_GP3',min,min),(exp11,'ZSJ_SRC_ZQFL_GP3',max,max))
38                              #PRJT2: [1, 1, 362]; exp_num(9), is_atom(FALSE) 
39                                #BLKUP2: [1, 1, 362]; IDX_M_T_SECDATA4(T_M_T_SECDATA)
40                                  #SLCT2: [1, 1, 362]; (T_M_T_SECDATA.C_FIELD7 IN LIST AND exp_cast(T_M_T_SECDATA.N_CHECK_STATE) = 1)
41                                    #SSEK2: [1, 1, 362]; scan_type(ASC), IDX_M_T_SECDATA4(T_M_T_SECDATA), scan_range[(exp11-exp_cast(1),'ZSJ_SRC_ZQFL_GP3',min,min),(exp11-exp_cast(1),'ZSJ_SRC_ZQFL_GP3',max,max))
42                          #PRJT2: [1, 1, 362]; exp_num(9), is_atom(FALSE) 
43                            #SLCT2: [1, 1, 362]; (T_M_T_SECDATA.C_FIELD8 = 'FIX' AND exp_cast(T_M_T_SECDATA.N_CHECK_STATE) = 1)
44                              #BLKUP2: [1, 1, 362]; IDX_M_T_SECDATA(T_M_T_SECDATA)
45                                #SSEK2: [1, 1, 362]; scan_type(ASC), IDX_M_T_SECDATA(T_M_T_SECDATA), scan_range[(exp11,'ZSJ_SRC_GDLLB_GP3'),(exp11,'ZSJ_SRC_GDLLB_GP3')]
46                      #PRJT2: [1, 1, 362]; exp_num(9), is_atom(FALSE) 
47                        #SLCT2: [1, 1, 362]; (T_M_T_SECDATA.C_FIELD8 = 'FIX' AND exp_cast(T_M_T_SECDATA.N_CHECK_STATE) = 1)
48                          #BLKUP2: [1, 1, 362]; IDX_M_T_SECDATA(T_M_T_SECDATA)
49                            #SSEK2: [1, 1, 362]; scan_type(ASC), IDX_M_T_SECDATA(T_M_T_SECDATA), scan_range[(exp11-exp_cast(1),'ZSJ_SRC_GDLLB_GP3'),(exp11-exp_cast(1),'ZSJ_SRC_GDLLB_GP3')]
50                #BLKUP2: [1, 1, 157]; IDX_M_T_SECDATA4(A2)
51                  #SSEK2: [1, 1, 157]; scan_type(ASC), IDX_M_T_SECDATA4(T_M_T_SECDATA as A2), scan_range[(A1.D_DEALDATE,'ZSJ_SRC_ZQFLCSZ_GP3','1',A1.TEMP),(A1.D_DEALDATE,'ZSJ_SRC_ZQFLCSZ_GP3','1',A1.TEMP)]

由于类型不匹配即使等值也无法在SSEK时定位到。

将1修改为'1'后的执行计划



1   #NSET2: [6, 1, 1120] 
2     #PRJT2: [6, 1, 1120]; exp_num(1), is_atom(FALSE) 
3       #AAGR2: [6, 1, 1120]; grp_num(0), sfun_num(1), distinct_flag[0]; slave_empty(0)
4         #PRJT2: [6, 1, 1120]; exp_num(0), is_atom(FALSE) 
5           #DISTINCT: [6, 1, 1120]
6             #PRJT2: [5, 3, 1120]; exp_num(13), is_atom(FALSE) 
7               #INDEX JOIN LEFT JOIN2: [5, 3, 1120]  ret_null(0)
8                 #HASH LEFT JOIN2: [4, 3, 1120]; key_num(1), partition_keys_num(0), ret_null(0), mix(0) KEY(CC.C_FIELD1=A1.C_FIELD1)
9                   #PRJT2: [1, 1, 758]; exp_num(5), is_atom(FALSE) 
10                    #NEST LOOP LEFT JOIN2: [1, 1, 758]; join condition((C.C_PORT_CODE = C1.C_PORT_CODE AND C.C_FIELD1 = C1.C_FIELD1))[with var] partition_keys_num(0) ret_null(0)
11                      #PRJT2: [1, 1, 427]; exp_num(4), is_atom(FALSE) 
12                        #INDEX JOIN LEFT JOIN2: [1, 1, 427] join condition((C.C_SEC_VAR_CODE = S.C_SEC_VAR_CODE AND exp_cast(S.N_CHECK_STATE) = 1)) ret_null(0)
13                          #PARALLEL: [1, 1, 427]; scan_type(EQU), key_num(1, 0, 0), simple(0)
14                            #HASH RIGHT SEMI JOIN2: [1, 1, 427]; n_keys(1) (ANTI), KEY(DMTEMPVIEW_891037856.colname=C.C_FIELD2) KEY_NULL_EQU(0)
15                              #CONST VALUE LIST: [1, 2, 48]; row_num(2), col_num(1), 
16                              #BLKUP2: [1, 1, 427]; IDX_M_T_ZQCC1(C)
17                                #SLCT2: [1, 1, 427]; (C.C_SEC_VAR_CODE >= 'ZQ' AND C.C_SEC_VAR_CODE < 'ZR')
18                                  #SSEK2: [1, 1, 427]; scan_type(ASC), IDX_M_T_ZQCC1(T_M_T_ZQCC as C), scan_range[('CC_SRC_GP3_VIEW',exp11,'BI0111','1',min,min),('CC_SRC_GP3_VIEW',exp11,'BI0111','1',max,max))
19                          #BLKUP2: [1, 1, 96]; IDX_M_T_SECINFO1(S)
20                            #SSEK2: [1, 1, 96]; scan_type(ASC), IDX_M_T_SECINFO1(T_M_T_SECINFO as S), scan_range[(C.C_SEC_CODE,C.C_MKT_CODE),(C.C_SEC_CODE,C.C_MKT_CODE)]
21                      #PRJT2: [1, 1, 331]; exp_num(3), is_atom(FALSE) 
22                        #PARALLEL: [1, 1, 331]; scan_type(EQU), key_num(1, 0, 0), simple(0)
23                          #HASH RIGHT SEMI JOIN2: [1, 1, 331]; n_keys(1) (ANTI), KEY(DMTEMPVIEW_891037857.colname=T_M_T_ZQCC.C_FIELD2) KEY_NULL_EQU(0)
24                            #CONST VALUE LIST: [1, 2, 48]; row_num(2), col_num(1), 
25                            #BLKUP2: [1, 1, 331]; IDX_M_T_ZQCC1(T_M_T_ZQCC)
26                              #SLCT2: [1, 1, 331]; T_M_T_ZQCC.C_PORT_CODE = var6
27                                #SSEK2: [1, 1, 331]; scan_type(ASC), IDX_M_T_ZQCC1(T_M_T_ZQCC), scan_range[('CC_SRC_GP3_VIEW',exp11,'BI0111','1',var7,'ZQ'),('CC_SRC_GP3_VIEW',exp11,'BI0111','1',var7,'ZR'))
28                  #PRJT2: [2, 4, 362]; exp_num(9), is_atom(FALSE) 
29                    #UNION ALL: [2, 4, 362]
30                      #PRJT2: [1, 3, 362]; exp_num(9), is_atom(FALSE) 
31                        #UNION ALL: [1, 3, 362]
32                          #PRJT2: [1, 2, 362]; exp_num(9), is_atom(FALSE) 
33                            #UNION ALL: [1, 2, 362]
34                              #PRJT2: [1, 1, 362]; exp_num(9), is_atom(FALSE) 
35                                #BLKUP2: [1, 1, 362]; IDX_M_T_SECDATA4(T_M_T_SECDATA)
36                                  #SLCT2: [1, 1, 362]; (T_M_T_SECDATA.C_FIELD7 IN LIST AND exp_cast(T_M_T_SECDATA.N_CHECK_STATE) = 1)
37                                    #SSEK2: [1, 1, 362]; scan_type(ASC), IDX_M_T_SECDATA4(T_M_T_SECDATA), scan_range[(exp11,'ZSJ_SRC_ZQFL_GP3',min,min),(exp11,'ZSJ_SRC_ZQFL_GP3',max,max))
38                              #PRJT2: [1, 1, 362]; exp_num(9), is_atom(FALSE) 
39                                #BLKUP2: [1, 1, 362]; IDX_M_T_SECDATA4(T_M_T_SECDATA)
40                                  #SLCT2: [1, 1, 362]; (T_M_T_SECDATA.C_FIELD7 IN LIST AND exp_cast(T_M_T_SECDATA.N_CHECK_STATE) = 1)
41                                    #SSEK2: [1, 1, 362]; scan_type(ASC), IDX_M_T_SECDATA4(T_M_T_SECDATA), scan_range[(exp11-exp_cast(1),'ZSJ_SRC_ZQFL_GP3',min,min),(exp11-exp_cast(1),'ZSJ_SRC_ZQFL_GP3',max,max))
42                          #PRJT2: [1, 1, 362]; exp_num(9), is_atom(FALSE) 
43                            #SLCT2: [1, 1, 362]; (T_M_T_SECDATA.C_FIELD8 = 'FIX' AND exp_cast(T_M_T_SECDATA.N_CHECK_STATE) = 1)
44                              #BLKUP2: [1, 1, 362]; IDX_M_T_SECDATA(T_M_T_SECDATA)
45                                #SSEK2: [1, 1, 362]; scan_type(ASC), IDX_M_T_SECDATA(T_M_T_SECDATA), scan_range[(exp11,'ZSJ_SRC_GDLLB_GP3'),(exp11,'ZSJ_SRC_GDLLB_GP3')]
46                      #PRJT2: [1, 1, 362]; exp_num(9), is_atom(FALSE) 
47                        #SLCT2: [1, 1, 362]; (T_M_T_SECDATA.C_FIELD8 = 'FIX' AND exp_cast(T_M_T_SECDATA.N_CHECK_STATE) = 1)
48                          #BLKUP2: [1, 1, 362]; IDX_M_T_SECDATA(T_M_T_SECDATA)
49                            #SSEK2: [1, 1, 362]; scan_type(ASC), IDX_M_T_SECDATA(T_M_T_SECDATA), scan_range[(exp11-exp_cast(1),'ZSJ_SRC_GDLLB_GP3'),(exp11-exp_cast(1),'ZSJ_SRC_GDLLB_GP3')]
50                #BLKUP2: [1, 1, 157]; IDX_M_T_SECDATA4(A2)
51                  #SSEK2: [1, 1, 157]; scan_type(ASC), IDX_M_T_SECDATA4(T_M_T_SECDATA as A2), scan_range[(A1.D_DEALDATE,'ZSJ_SRC_ZQFLCSZ_GP3','1',A1.TEMP),(A1.D_DEALDATE,'ZSJ_SRC_ZQFLCSZ_GP3','1',A1.TEMP)]

修改类型后在索引定位时可以匹配到。

标签:类型转换,CODE,IDX,案例,SECDATA,索引,num,exp,362
From: https://www.cnblogs.com/lixiaomeng/p/18132218

相关文章

  • mysql 索引设计原则
    适合添加索引的情况1.字段的数值有唯一性的限制索引本身可以起到约束的作用,比如唯一索引、主键索引都可以起到唯一性约束的,因此我们在创建数据表时,如果某个字段时唯一的,就可以直接创建唯一性索引或主键索引。不要以为唯一索引影响了insert的速度,这个速度损耗可以忽略不计,单体......
  • 电脑开机时报错No Bootable Device找不到索引的解决方法
      本文介绍笔记本电脑出现NoBootableDevice错误提示,且无法开机的多种解决办法。1问题产生  最近,笔记本电脑正在正常使用时,突然蓝屏,出现你的设备遇到问题,需要重启。的提示;最下方的终止代码具体是CRITICAL_PROCESS_DIED还是SYSTEM_SERVICE_EXCEPTION有点记不太清楚了,不过这......
  • 内存性能引发的程序性能恶化案例
    在一台机器上测试spec。发现性能很差。使用top去看,发现cpu可以占满,但即便能占用大量cpu资源吞吐量却上不去。使用perfstat去看。#perfstat-a-p946806PID/TIDswitchoverridingSYSTEM^CPerformancecounterstatsforprocessid'946806':6,025,883.23msec......
  • String类型转LPCTSTR -----理解C++中的字符串类型转换
    在看代码时,发现有时候会把string类型转换为LPCTSTR,刚开始不理解为什么要做这个转换,所以做了一些调查,现在记录如下是这样的,STRING是代表C++中的字符串string,而LPCTSTR代表的是Windows系统中的字符串类型。也就是说,这样转换的目的是为了把C++中的字符串string转换为Windows系......
  • 3568F-物联网模块开发案例
     ......
  • 一个糟糕的数据库架构设计优化案例
    聊聊一个糟糕的数据库架构设计带来的问题。技术人人都可以磨炼,但处理问题的思路和角度各有不同,希望这篇文章可以抛砖引玉。以一个例子为切入点一、问题背景某系统已经线上运行多年,数据量随着时间的推移越来越大。公司业务量还在不断增加,已经潜在威胁数据库的运行效率,急需清理历......
  • Python中利用enumerate()精简循环中的索引和元素访问
    ​ Python中,enumerate()函数是一个内置函数,用于在遍历序列(如列表、元组或字符串)时同时获取每个元素的索引和值。可以使代码更简洁、更易读,特别是在需要索引时。使用enumerate()可以避免使用传统的范围(range())和长度(len())组合来访问元素和它们的索引。参考文档:Python中......
  • MySQL binlog超过binlog_expire_logs_seconds阈值没有删除案例
    生产环境有一套3个节点的MySQLInnoDBCluster,MySQL的版本为Serverversion:8.0.35MySQLCommunityServer-GPL,早上突然收到Zabbix的告警,其中一个节点出现空间告警:"/data:Diskspaceislow(used>80%)"检查分析后发现是因为MySQL的binlog没有清理导致空间报警,如下所示(b......
  • KingbaseES V8R3备份恢复案例---sys_rman_v6执行物理备份
    案例说明:在KingbaseESV8R3的最新版本中使用了sys_rman_v6执行备份,本案例介绍如何使用sys_rman_v6执行物理备份。适用版本:KingbaseESV8R3系统架构:test=#showpool_nodes;node_id|hostname|port|status|lb_weight|role|select_cnt|load_balance_n......
  • Dockerfile 安装centos案例
    1.编写dockerfile文件去安装cetos的操作步骤:   2.执行Dockerfile文件:dockerbuild-tcentosjava8:1.5.ps:其中,-t选项用于指定镜像的名称,centosjava8:1.5是你为镜像命名的名称,可以替换成其他任意名称。.表示当前目录,指示Docker在当前目录下寻找Dockerfil......