[20240325]FORCE_MATCHING_SIGNATURE與DML.txt

来源:https://www.cnblogs.com/lfree/p/18097599
-Advertisement-
Play Games

升級背景 因項目需要使用數據質量模塊功能,可以為數倉提供良好的數據質量監控功能。故要對已有2.0版本升級到3.0版本以上,此次選擇測試了3.0.1 和 3.1.1 兩個版本,對進行同數據等任務調度暫停等操作測試,最後選擇3.0.1 版本 原因: 1. 3.1.1 在測試sql任務時 ,同時啟動上百s ...


[20240325]FORCE_MATCHING_SIGNATURE與DML.txt

--//生產系統遇到1個FORCE_MATCHING_SIGNATURE重合的奇怪現象,一般情況都是相似的sql語句(沒有使用綁定變數的sql語句),
--//FORCE_MATCHING_SIGNATURE相同。

--//實際上insert語句真實FORCE_MATCHING_SIGNATURE=0,但是在v$active_session_history視圖裡面記錄的不是0.補充看看
--//update,delete的情況.

1.環境:

SCOTT@test01p> @ver1

PORT_STRING                    VERSION        BANNER                                                                               CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0           12.2.0.1.0     Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production              0

2.測試:
SCOTT@test01p> create table deptx as select * from dept;
Table created.

SCOTT@test01p> update deptx set dname='OPERATIONs' where deptno=40;
1 row updated.

SCOTT@test01p> @ hash
HASH_VALUE SQL_ID        CHILD_NUMBER KGL_BUCKET PLAN_HASH_VALUE HASH_HEX   SQL_EXEC_START      SQL_EXEC_ID
---------- ------------- ------------ ---------- --------------- ---------- ------------------- -----------
 195324603 91tfrg45u8upv            0      27323       953445556   ba46abb  2024-03-24 20:15:11    16777216

SCOTT@test01p> SELECT sql_id , FORCE_MATCHING_SIGNATURE , EXACT_MATCHING_SIGNATURE FROM v$sqlarea WHERE sql_id ='91tfrg45u8upv';
SQL_ID        FORCE_MATCHING_SIGNATURE EXACT_MATCHING_SIGNATURE
------------- ------------------------ ------------------------
91tfrg45u8upv      6835334835661492384     11664111839893633356

SCOTT@test01p> rollback ;
Rollback complete.

SCOTT@test01p> delete from deptx where deptno=40;
1 row deleted.

SCOTT@test01p> @ hash
HASH_VALUE SQL_ID        CHILD_NUMBER KGL_BUCKET PLAN_HASH_VALUE HASH_HEX   SQL_EXEC_START      SQL_EXEC_ID
---------- ------------- ------------ ---------- --------------- ---------- ------------------- -----------
2038036759 gpm05hdwrmy8r            0     129303      4270570698  7979f917  2024-03-24 20:16:53    16777216

SCOTT@test01p> SELECT sql_id , FORCE_MATCHING_SIGNATURE , EXACT_MATCHING_SIGNATURE FROM v$sqlarea WHERE sql_id ='gpm05hdwrmy8r';
SQL_ID        FORCE_MATCHING_SIGNATURE EXACT_MATCHING_SIGNATURE
------------- ------------------------ ------------------------
gpm05hdwrmy8r      2492147175363620523     10663115601857554706

--//可以看出update,delete語句FORCE_MATCHING_SIGNATURE<>0.

3.繼續看看insert:

SCOTT@test01p> SELECT sql_id , FORCE_MATCHING_SIGNATURE , EXACT_MATCHING_SIGNATURE,sql_text FROM v$sqlarea WHERE sql_id ='46b7gx2ucjuv0';
SQL_ID        FORCE_MATCHING_SIGNATURE EXACT_MATCHING_SIGNATURE SQL_TEXT
------------- ------------------------ ------------------------ ------------------------------------------------------------
46b7gx2ucjuv0                        0                        0 insert into deptx values (50 ,'1','a')
--//確實insert語句的FORCE_MATCHING_SIGNATURE=0.

4.總結:
--//對於dml語句,update,delet的FORCE_MATCHING_SIGNATURE<>0,insert FORCE_MATCHING_SIGNATURE=0.
--//至於oracle為什麼這樣設計,也許insert語句都是情況下涉及1條記錄.也許oracle認為計算FORCE_MATCHING_SIGNATURE有點多餘.
--//這樣通過FORCE_MATCHING_SIGNATURE定位沒有使用綁定變數的insert語句就有點不可行.
--//上面的補充測試說明總結有點問題,看下麵的測試,不再說明.

5.補充:
--//上班在19c下測試看看:
[email protected]:1521/orcl> select * from V$SQLCOMMAND where COMMAND_NAME in ('INSERT','UPDATE','DELETE','SELECT');
COMMAND_TYPE COMMAND_NAME CON_ID
------------ ------------ ------
           2 INSERT            0
           3 SELECT            0
           6 UPDATE            0
           7 DELETE            0


[email protected]:1521/orcl> select  exact_MATCHING_SIGNATURE,FORCE_MATCHING_SIGNATURE,COMMAND_TYPE,sql_id,sql_text c100  from v$sqlarea where COMMAND_TYPE in (6) and rownum<=3;
EXACT_MATCHING_SIGNATURE FORCE_MATCHING_SIGNATURE COMMAND_TYPE SQL_ID        C100
------------------------ ------------------------ ------------ ------------- ---------------------------------------------------------------------------------------
    17865118844887934453     17865118844887934453            6 brdyxt33f000j update his_temp_order set state=:state where order_id in('3^1^502153150')
     5091739948496261956      5091739948496261956            6 74zvqdmua800s update his_temp_order set state=:state where order_id in('1^2^28934060','1^2^28934060')
     4225582535830192454      4225582535830192454            6 07sn9j5nrs01j update his_temp_order set state=:state where order_id in('2^1^201449744')
--//註意EXACT_MATCHING_SIGNATURE=FORCE_MATCHING_SIGNATURE,主要因為常量與綁定變數混合.
--//實際上第1條,第3條類似,oracle 23c版本以後解決了這個問題.

[email protected]:1521/orcl> select  exact_MATCHING_SIGNATURE,FORCE_MATCHING_SIGNATURE,COMMAND_TYPE,sql_id,sql_text c100  from v$sqlarea where COMMAND_TYPE in (6) and FORCE_MATCHING_SIGNATURE=0;
EXACT_MATCHING_SIGNATURE FORCE_MATCHING_SIGNATURE COMMAND_TYPE SQL_ID        C100
------------------------ ------------------------ ------------ ------------- ----------------------------------------------------------------------------------------------------
                       0                        0            6 2vb9hsvpw0gtg update /* QOSD */ /*+ index(es) */ exp_stat$ es set dynamic_cost = :3, eval_count = :4, ctime = :6,
                                                                             last_modified = :7 where exp_id = :1 and objn = :2 and snapshot_id = :5

                       0                        0            6 4m7m0t6fjcs5x update seq$ set increment$=:2,minvalue=:3,maxvalue=:4,cycle#=:5,order$=:6,cache=:7,highwater=:8,audi
                                                                             t$=:9,flags=:10 where obj#=:1

                       0                        0            6 9zg9qd9bm4spu update user$ set spare6=DECODE(to_char(:2, 'YYYY-MM-DD'), '0000-00-00', to_date(NULL), :2) where use
                                                                             r#=:1

                       0                        0            6 c3utnxsnrx8tk update obj$ set obj#=:4, type#=:5,ctime=:6,mtime=:7,stime=:8,status=:9,dataobj#=:10,flags=:11,oid$=:
                                                                             12,spare1=:13,spare2=:14,spare3=:15,signature=:16,spare7=:17,spare8=:18,spare9=:19, dflcollid=decode
                                                                             (:20,0,null,:20),creappid=:21,creverid=:22, modappid=:23,modverid=:24,crepatchid=:25,modpatchid=:26
                                                                             where owner#=:1 and name=:2 and namespace=:3 and remoteowner is null and linkname is null and subnam
                                                                             e is null

                       0                        0            6 0dfxfyy5r32qq update /* QOSD */ /*+ index(eo) */ exp_obj$ eo set exp_cnt = :3 where objn = :1 and snapshot_id = :2
                       0                        0            6 4usy97b1zbbj5 update /* QOSD */ /*+ index(do) */ opt_directive_own$ do set dir_cnt = :2 where dir_own# = :1
                       0                        0            6 0kkhhb2w93cx0 update seg$ set type#=:4,blocks=:5,extents=:6,minexts=:7,maxexts=:8,extsize=:9,extpct=:10,user#=:11,
                                                                             iniexts=:12,lists=decode(:13, 65535, NULL, :13),groups=decode(:14, 65535, NULL, :14), cachehint=:15,
                                                                              hwmincr=:16, spare1=DECODE(:17,0,NULL,:17),scanhint=:18, bitmapranges=:19 where ts#=:1 and file#=:2
                                                                              and block#=:3
7 rows selected.
--//update還是小量FORCE_MATCHING_SIGNATURE=0的情況,似乎這些都是遞歸執行的sql語句.

[email protected]:1521/orcl> select  exact_MATCHING_SIGNATURE,FORCE_MATCHING_SIGNATURE,COMMAND_TYPE,sql_id,sql_text c120  from v$sqlarea where COMMAND_TYPE in (7) and rownum<=3;
EXACT_MATCHING_SIGNATURE FORCE_MATCHING_SIGNATURE COMMAND_TYPE SQL_ID        C120
------------------------ ------------------------ ------------ ------------- ------------------------------------------------------------------------------------------------------------------------
     7757287074397251898      7757287074397251898            7 0f7zrpy7d002c delete from WRH$_DISPATCHER tab where (dbid = :dbid)    and snap_id in (select snap_id from X$KEWRIPSL)
    17959689988878125270     17959689988878125270            7 8ndb2w3rdc0tv delete from WRH$_MEMORY_RESIZE_OPS tab where (dbid = :dbid)    and snap_id in (select snap_id from X$KEWRIPSL)
     5160622103966497918      5160622103966497918            7 9k2d87r4cn0ux DELETE FROM wri$_adv_rationale a      WHERE a.task_id = :task_id_num AND           (:execution_name IS NULL OR :executio
                                                                             n_name1 = a.exec_name)

[email protected]:1521/orcl> select  exact_MATCHING_SIGNATURE,FORCE_MATCHING_SIGNATURE,COMMAND_TYPE,sql_id,sql_text c100  from v$sqlarea where COMMAND_TYPE in (7) and FORCE_MATCHING_SIGNATURE=0;
EXACT_MATCHING_SIGNATURE FORCE_MATCHING_SIGNATURE COMMAND_TYPE SQL_ID        C100
------------------------ ------------------------ ------------ ------------- ----------------------------------------------------------------------------------------------------
                       0                        0            7 4rs3f2phhsb80 delete /* KSXM:CLEAN_DML_INF *//*+ dynamic_sampling(4) */    from sys.mon_mods_all$ m   where not ex
                                                                             ists         (select /*+ unnest */ 1 from sys.obj$ o where o.obj# = m.obj#)  and rownum <=  :1

                       0                        0            7 6kucyxfkgsh2c delete /*+ dynamic_sampling(4) */ /* KSXM:CLEAN_COLGR_USAGE */  from sys.col_group_usage$ c   where
                                                                             (((timestamp < sysdate - 367) and bitand(flags, 8) = 0)          or not exists             (select /
                                                                             *+ unnest */ 1 from sys.obj$ o where o.obj# = c.obj#))     and c.obj# < :1  and rownum <=  :2

                       0                        0            7 a81vzf0fa0q1p delete  /* KSXM:CLEAN_PEND_IND *//*+ dynamic_sampling(4) */  from sys.wri$_optstat_ind_history i   w
                                                                             here not exists         (select /*+ unnest */ 1 from sys.obj$ o where o.obj# = i.obj#)     and savti
                                                                             me >= timestamp '3000-12-01 01:00:00 -0:0'  and rownum <=  :1

                       0                        0            7 caz4ct3720rcy delete /* QOSD */ /*+ index(fo) */  from opt_finding_obj$ fo where f_id = :1
                       0                        0            7 0vg7j6xx91fw8 delete /*+ index(d) */ from opt_directive$ d where dir_own# = :1 and dir_id = :2
                       0                        0            7 av0kjjbhc642q delete from objauth$ where obj#=:1
                       0                        0            7 4faa5w420ua14 delete /* KSXM:CLEAN_PEND_HIST *//*+ dynamic_sampling(4) */   from sys.wri$_optstat_histgrm_history
                                                                             g   where not exists         (select /*+ unnest */ 1 from sys.obj$ o where o.obj# = g.obj#)     and
                                                                             savtime >= timestamp '3000-12-01 01:00:00 -0:0'  and rownum <=  :1

                       0                        0            7 fnafmumu52s48 delete /* KSXM:CLEAN_USER_PREF *//*+ dynamic_sampling(4) */   from sys.optstat_user_prefs$ p   where
                                                                              not exists         (select /*+ unnest */ 1 from sys.obj$ o where o.obj# = p.obj#)  and rownum <=  :
                                                                             1

                       0                        0            7 g94wn7w0dr4tp delete /* KSXM:CLEAN_PEND_COL *//*+ dynamic_sampling(4) */   from sys.wri$_optstat_histhead_history
                                                                             h   where not exists         (select /*+ unnest */ 1 from sys.obj$ o where o.obj# = h.obj#)     and
                                                                             savtime >= timestamp '3000-12-01 01:00:00 -0:0'  and rownum <=  :1

                       0                        0            7 gxrr466g0v9ck delete /* KSXM:CLEAN_PEND_TAB *//*+ dynamic_sampling(4) */   from sys.wri$_optstat_tab_history t   w
                                                                             here not exists         (select /*+ unnest */ 1 from sys.obj$ o where o.obj# = t.obj#)     and savti
                                                                             me >= timestamp '3000-12-01 01:00:00 -0:0'  and rownum <=  :1

                       0                        0            7 59vjj34vugaav delete from obj$ where obj# = :1
                       0                        0            7 fqwrqhnvszdyc delete /* QOSD*/ /*+ index(f) */ from opt_finding$ f where f_id = :1
                       0                        0            7 dqucusk8avvuh delete /* KSXM:CLEAN_COL_USAGE *//*+ dynamic_sampling(4) */    from sys.col_usage$ c   where ((times
                                                                             tamp < sysdate - 367)          or not exists             (select /*+ unnest */ 1 from sys.obj$ o whe
                                                                             re o.obj# = c.obj#))     and c.obj# < :1  and rownum <=  :2
13 rows selected.
--//delte語句與uodate語句類似.
    
[email protected]:1521/orcl> select * from (select  exact_MATCHING_SIGNATURE,FORCE_MATCHING_SIGNATURE,COMMAND_TYPE,count(*)  from v$sqlarea where COMMAND_TYPE in (2) group by exact_MATCHING_SIGNATURE,FORCE_MATCHING_SIGNATURE,COMMAND_TYPE) where rownum<=5;
EXACT_MATCHING_SIGNATURE FORCE_MATCHING_SIGNATURE COMMAND_TYPE   COUNT(*)
------------------------ ------------------------ ------------ ----------
                       0                        0            2        594
      393115081183021282       393115081183021282            2          1
      518037916034776970       518037916034776970            2          1
      554814305626883822       554814305626883822            2          1
      568855978993142464       568855978993142464            2          1

--//看來我前面的測試存在問題,可以發現insert語句還是存在FORCE_MATCHING_SIGNATURE<>0的情況.雖然大部分是等於0的情況,還是存
--//在少量<>0的情況,註意這些語句的count(*)=1,看看是那些語句.

[email protected]:1521/orcl> select sql_id , sql_fulltext c200  from v$sqlarea where FORCE_MATCHING_SIGNATURE=393115081183021282;
SQL_ID        C200
------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
9mz660r1c0z3f INSERT  INTO "SYS"."WRM$_PDB_INSTANCE" "A1" ("DBID","INSTANCE_NUMBER","STARTUP_TIME","CON_DBID","OPEN_TIME","OPEN_MODE","PDB_NAME","SNAP_ID","STARTUP_TIME_TZ","OPEN_TIME_TZ") SELECT :DBID,:INSTANCE_NU
              MBER,:STARTUP_TIME,"A2"."DBID",CAST(("A2"."STIME" AT TIME ZONE 'UTC')+:TIMEZONE AS timestamp(3)),DECODE(DECODE("A2"."STATE",0,'MOUNTED',1,'READ WRITE',2,'READ ONLY',3,'MIGRATE'),'READ WRITE','OPEN','R
              EAD ONLY','READ ONLY','INVALID'),"A2"."NAME",:SNAP_ID,TO_TIMESTAMP_TZ(TO_CHAR(:STARTUP_TIME,'YYYY/MM/DD HH24:MI:SS.FF3')||' '||TO_CHAR(EXTRACT(HOUR FROM :TIMEZONE),'fm00')||':'||TO_CHAR(EXTRACT(MINUTE
               FROM :TIMEZONE),'fm00'),'YYYY/MM/DD HH24:MI:SS.FF3 TZH:TZM'),"A2"."STIME" FROM "SYS"."X$CON"@! "A2" WHERE (DECODE("A2"."STATE",0,'MOUNTED',1,'READ WRITE',2,'READ ONLY',3,'MIGRATE')='READ WRITE' OR DE
              CODE("A2"."STATE",0,'MOUNTED',1,'READ WRITE',2,'READ ONLY',3,'MIGRATE')='READ ONLY') AND  NOT EXISTS (SELECT 1 FROM "SYS"."WRM$_PDB_INSTANCE" "A3" WHERE "A3"."DBID"=:DBID AND "A3"."INSTANCE_NUMBER"=:I
              NSTANCE_NUMBER AND "A3"."STARTUP_TIME"=:STARTUP_TIME AND "A3"."CON_DBID"="A2"."DBID" AND "A3"."OPEN_TIME"=CAST(("A2"."STIME" AT TIME ZONE 'UTC')+:TIMEZONE AS timestamp(3))) AND "A2"."INST_ID"=:INSTANC
              E_NUMBER_01 AND "A2"."DTIME"=0

[email protected]:1521/orcl> select sql_id , sql_fulltext c200  from v$sqlarea where FORCE_MATCHING_SIGNATURE=518037916034776970;
SQL_ID        C200
------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
g8kn776jn7u28 INSERT INTO  WRH$_SERVICE_NAME  (dbid, per_pdb, con_dbid, snap_id,  service_name_hash, service_name )  SELECT dbid, t2.per_pdb, con_dbid, snap_id,  service_name_hash, service_name    FROM  x$kewrattrn
              ew t1,  (SELECT * from  WRHS$_SERVICE_NAME  wrhs WHERE wrhs.dbid     = :dbid    AND wrhs.stage_id      = :sweep_stgid    AND wrhs.stage_inst_id = :sweep_inst ) t2 WHERE  t1.NUM1_KEWRATTR = t2.SERVICE_
              NAME_HASH AND  t1.NUM2_KEWRATTR = t2.CON_DBID


[email protected]:1521/orcl> select sql_id , sql_fulltext c200  from v$sqlarea where FORCE_MATCHING_SIGNATURE=568855978993142464;
SQL_ID        C200
------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
bfgtjwq3m8smh INSERT  INTO "SYS"."WRH$_JAVA_POOL_ADVICE" "A1" ("DBID","PER_PDB","CON_DBID","SNAP_ID","INSTANCE_NUMBER","JAVA_POOL_SIZE_FOR_ESTIMATE","JAVA_POOL_SIZE_FACTOR","ESTD_LC_SIZE","ESTD_LC_MEMORY_OBJECTS","
              ESTD_LC_TIME_SAVED","ESTD_LC_TIME_SAVED_FACTOR","ESTD_LC_LOAD_TIME","ESTD_LC_LOAD_TIME_FACTOR","ESTD_LC_MEMORY_OBJECT_HITS") SELECT :DBID,0,:SRCDBID,:SNAP_ID,:INSTANCE_NUMBER,"A2"."JAVA_SIZE",ROUND("A
              2"."JAVA_SIZE"/"A2"."BASEJAVA_SIZE",4),"A2"."KGLJSIM_SIZE","A2"."KGLJSIM_OBJS","A2"."KGLJSIM_TIMESAVE",DECODE("A2"."KGLJSIM_BASETIMESAVE",0,TO_NUMBER(NULL),ROUND("A2"."KGLJSIM_TIMESAVE"/"A2"."KGLJSIM_
              BASETIMESAVE",4)),"A2"."KGLJSIM_PARSETIME",DECODE("A2"."KGLJSIM_BASEPARSETIME",0,TO_NUMBER(NULL),ROUND("A2"."KGLJSIM_PARSETIME"/"A2"."KGLJSIM_BASEPARSETIME",4)),"A2"."KGLJSIM_HITS" FROM "SYS"."X$KGLJS
              IM"@! "A2" WHERE "A2"."INST_ID"=:INSTANCE_NUMBER_01

--//可以看出這類insert語句的特點就是採用的都是insert+select的方式操作.
您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 大家好,我是痞子衡,是正經搞技術的痞子。今天痞子衡給大家介紹的是i.MXRT1xxx系列GPIO提早供電會影響上電時序導致內部DCDC啟動失敗。 最近有一個 RW612 產品線的同事在設計一個雙 MCU 系統 Demo 時發現,當 RW612 板卡和 RT1060 板卡通過 UART 對接時,如果 ...
  • 目錄微型電腦的硬體共性結構及基本性能指標關於存儲器的介紹微型電腦的基本性能指標1. 字長2. 主頻3. 存儲容量4. 外設擴展能力5. 軟體配置情況Arm Cortex 系列微處理器系列概述Arm Cortex-A 系列處理器Arm Cortex-R 系列處理器Arm Cortex-M 系列處理 ...
  • 目錄遠程策略配置啟用遠程桌面使用設置啟用遠程桌面使用控制面板啟用遠程桌面 工作中有時需要使用遠程桌面,但工控機上面的策略一般都比較保守,遠程桌面經常會失敗。這裡記錄一下使用的遠程策略配置,方便以後工作中使用。 遠程策略配置 運行命令 gpedit.msc 打開本地策略編輯: 打開 電腦配置->管理 ...
  • 參考 Fedora Quick Docs Fedora Server Documentation Deploy an ARM64 Fedora VM on your PC: 3 steps Architectures/AArch64/Install with QEMU Virtualization ...
  • 華為雲GeminiDB是一款相容Redis協議的彈性KV資料庫,支持遠超記憶體的容量和極致的性能,技術自主創新,不受Redis協議變更影響。 ...
  • 資料庫三大範式的學習與資料庫表設計的瞭解 內容簡單介紹 對於資料庫三大範式的理解以及一些設計表示要註意的方面 本章內容梳理圖 資料庫三大範式比較官方的定義 資料庫的三大範式(Normal Forms)是關係資料庫設計中用於確保數據結構化、減少數據冗餘、並提高數據完整性的指導和規則。 以下是三大範式的 ...
  • 1.背景概述 最近在做數據同步測試,需要通過DTS將kafka中的數據同步到資料庫中,4G的數據量同步到資料庫用了大約4個多小時,這看起來並不合理;此時查看資料庫所在主機的CPU,IO的使用率都不高,沒有瓶頸;最後通過排查發現由於kafka,DTS,資料庫不再同一個機房,網路延遲較大,導致同步速率緩 ...
  • 目錄一、什麼是多實例二、MySQL多實例配置1、創建數據目錄2、創建配置文件3、編輯330{7..9}的配置文件4、初始化330{7..9}數據5、修改目錄許可權6、啟動多實例7、查看server_id8、進入單獨的MySQL實例9、關閉實例 一、什麼是多實例 Mysql多實例就是在一臺伺服器上同時開 ...
一周排行
    -Advertisement-
    Play Games
  • 隨著Aspire發佈preview5的發佈,Microsoft.Extensions.ServiceDiscovery隨之更新, 服務註冊發現這個屬於老掉牙的話題解決什麼問題就不贅述了,這裡主要講講Microsoft.Extensions.ServiceDiscovery(preview5)以及如何 ...
  • 概述:通過使用`SemaphoreSlim`,可以簡單而有效地限制非同步HTTP請求的併發量,確保在任何給定時間內不超過20個網頁同時下載。`ParallelOptions`不適用於非同步操作,但可考慮使用`Parallel.ForEach`,儘管在非同步場景中謹慎使用。 對於併發非同步 I/O 操作的數量 ...
  • 1.Linux上安裝Docken 伺服器系統版本以及內核版本:cat /etc/redhat-release 查看伺服器內核版本:uname -r 安裝依賴包:yum install -y yum-utils device-mapper-persistent-data lvm2 設置阿裡雲鏡像源:y ...
  • 概述:WPF界面綁定和渲染大量數據可能導致性能問題。通過啟用UI虛擬化、非同步載入和數據分頁,可以有效提高界面響應性能。以下是簡單示例演示這些優化方法。 在WPF中,當你嘗試綁定和渲染大量的數據項時,性能問題可能出現。以下是一些可能導致性能慢的原因以及優化方法: UI 虛擬化: WPF提供了虛擬化技術 ...
  • 引言 上一章節介紹了 TDD 的三大法則,今天我們講一下在單元測試中模擬對象的使用。 Fake Fake - Fake 是一個通用術語,可用於描述 stub或 mock 對象。 它是 stub 還是 mock 取決於使用它的上下文。 也就是說,Fake 可以是 stub 或 mock Mock - ...
  • 為.net6在CentOS7上面做準備,先在vmware虛擬機安裝CentOS 7.9 新建CentOS764位的系統 因為CentOS8不更新了,所以安裝7;簡單就一筆帶過了 選擇下載好的操作系統的iso文件,下載地址https://mirrors.aliyun.com/centos/7.9.20 ...
  • 經過前面幾篇的學習,我們瞭解到指令的大概分類,如:參數載入指令,該載入指令以 Ld 開頭,將參數載入到棧中,以便於後續執行操作命令。參數存儲指令,其指令以 St 開頭,將棧中的數據,存儲到指定的變數中,以方便後續使用。創建實例指令,其指令以 New 開頭,用於在運行時動態生成並初始化對象。方法調用指... ...
  • LiteDB 是一個輕量級的嵌入式 NoSQL 資料庫,其設計理念與 MongoDB 類似,但它是完全使用 C# 開發的,因此與 C# 應用程式的集成非常順暢。與 SQLite 相比,LiteDB 提供了 NoSQL(即鍵值對)的數據存儲方式,並且是一個開源且免費的項目。它適用於桌面、移動以及 We ...
  • 1 開源解析和拆分文檔 第三方的工具去對文件解析拆分,去將我們的文件內容給提取出來,並將我們的文檔內容去拆分成一個小的chunk。常見的PDF word mark down, JSON、HTML。都可以有很好的一些模塊去把這些文件去進行一個東西去提取。 優勢 支持豐富的文檔類型 每種文檔多樣化選擇 ...
  • OOM是什麼?英文全稱為 OutOfMemoryError(記憶體溢出錯誤)。當程式發生OOM時,如何去定位導致異常的代碼還是挺麻煩的。 要檢查OOM發生的原因,首先需要瞭解各種OOM情況下會報的異常信息。這樣能縮小排查範圍,再結合異常堆棧、heapDump文件、JVM分析工具和業務代碼來判斷具體是哪 ...