数仓技术hive与oracle对比(二)

查询响应

hive从3.0版本开始移除了索引。由于客户端抽样机制,超过五十行的,oracle要在查询语句外层添加select count(*) from (query语句),与query语句对比,获取到准确查询时间。详见附录关于抽样的说明。

查询时,oracle客户端是sqldeveloper,hive客户端是dbvear。

单表

不限制字段数量,使用 * 查询所有字段

等值查询

单条查询 code或者pk

oracle

select * from t_od_bd_stordoc WHERE code='1020002';

SELECT * FROM t_od_org_orgs WHERE pk_org = '1001A1100000000LX48O';

SELECT * FROM t_od_bd_material WHERE code = '302550991000019';

SELECT * FROM t_od_ic_flow WHERE pk_flow = '1001A11000000003KBHH';

SELECT * FROM t_od_ic_flow_10 WHERE pk_flow = '1001A11000000003KBHH';

SELECT * FROM t_od_ic_flow_100 WHERE pk_flow = '1001A11000000003KBHH';

create unique index uninx_pk_flow on t_od_ic_flow (pk_flow);

create index inx_pk_flow_10 on t_od_ic_flow_10 (pk_flow);

create index inx_pk_flow_100 on t_od_ic_flow_100 (pk_flow);

drop index uninx_pk_flow;

drop index inx_pk_flow_10;

drop index inx_pk_flow_100;

hive

select * from ht_od_bd_stordoc WHERE code='1020002';

SELECT * FROM ht_od_org_orgs WHERE pk_org = '1001A1100000000LX48O';

SELECT * FROM ht_od_bd_material WHERE code = '302550991000019';

SELECT * FROM ht_od_ic_flow WHERE pk_flow = '1001A11000000003KBHH';

表名

返回量

无索引

用索引

hive

oracle

hive

oracle

XXX_BD_STORDOC

行1列45

3s

0.012s

XXX_ORG_ORGS

行1列130

2s

0.015s

XXX_BD_MATERIAL

行1列86

6s

0.037s

XXX_IC_FLOW

行1列166

8s

0.534s

0.043s

XXX_IC_FLOW_10

行10列166

11.261s

0.047s

XXX_IC_FLOW_100

行100列166

53.61s

0.044s

结论:当前硬件配置下,表行数在百万以内,oracle即使没有索引,响应速度依然能够很快。百万、千万记录的表,走索引的查询和不走索引的查询,响应速度差别巨大。

hive行数上万后,响应速度过长。

模糊查询

少量查询 code模糊查询

oracle

select * from t_od_bd_stordoc WHERE code LIKE '10%'

SELECT * FROM t_od_org_orgs WHERE code like '100%'

SELECT * FROM t_od_bd_material WHERE code like '30255099%'

SELECT * FROM t_od_ic_flow WHERE vbillcode like 'CR202308%'

SELECT * FROM t_od_ic_flow_10 WHERE vbillcode like 'CR202308%'

SELECT * FROM t_od_ic_flow_100 WHERE vbillcode like 'CR202308%'

CREATE INDEX inx_code ON T_OD_BD_MATERIAL (CODE);

CREATE INDEX inx_vbillcode ON T_OD_IC_FLOW (vbillcode );

CREATE INDEX inx_vbillcode_10 ON T_OD_IC_FLOW_10 (vbillcode );

CREATE INDEX inx_vbillcode_100 ON T_OD_IC_FLOW_100 (vbillcode );

drop index inx_vbillcode;

drop index inx_vbillcode_10;

drop index inx_vbillcode_100;

drop index inx_code;

hive

select * from ht_od_bd_stordoc WHERE code LIKE '10%'

SELECT * FROM ht_od_org_orgs WHERE code like '100%'

SELECT * FROM ht_od_bd_material WHERE code like '30255099%'

SELECT * FROM ht_od_ic_flow WHERE vbillcode like 'CR202308%'

表名

返回量

无索引

用索引

hive

oracle

hive

oracle

XXX_BD_STORDOC

行3列45

4s

0.005s

XXX_ORG_ORGS

行13列130

8s

0.024s

XXX_BD_MATERIAL

行191列86

10s

0.120s

0.064s

XXX_IC_FLOW

行1834列166

4s

0.682s

0.147s

XXX_IC_FLOW_10

行18340列166

10.754s

0.029s

XXX_IC_FLOW_100

行183400列166

102.334s

0.226s

结论:类似等值查询。

范围查询

少量查询 code范围查询

少量查询 code范围查询

oracle

select * from t_od_bd_stordoc WHERE code >= 'DK01' AND code <= 'DK11'

SELECT * FROM t_od_org_orgs WHERE code >= '10100' AND code <= '10200'

SELECT * FROM t_od_bd_material WHERE code >= '201515201000003' AND code <= '201515901000003'

SELECT * FROM t_od_ic_flow WHERE vbillcode >= 'CR2023080100000001' AND vbillcode <= 'CR2023083000000001'

SELECT * FROM t_od_ic_flow_10 WHERE vbillcode >= 'CR2023080100000001' AND vbillcode <= 'CR2023083000000001'

SELECT * FROM t_od_ic_flow_100 WHERE vbillcode >= 'CR2023080100000001' AND vbillcode <= 'CR2023083000000001'

hive

select * from ht_od_bd_stordoc WHERE code >= 'DK01' AND code <= 'DK11'

SELECT * FROM ht_od_org_orgs WHERE code >= '10100' AND code <= '10200'

SELECT * FROM ht_od_bd_material WHERE code >= '201515201000003' AND code <= '201515901000003'

SELECT * FROM ht_od_ic_flow WHERE vbillcode >= 'CR2023080100000001' AND vbillcode <= 'CR2023083000000001'

表名

返回量

无索引

用索引

hive

oracle

hive

oracle

XXX_BD_STORDOC

行6列45

4s

0.009s

XXX_ORG_ORGS

行69列130

6s

0.021s

XXX_BD_MATERIAL

行999列86

13.115s

0.193s

0.022s

XXX_IC_FLOW

行1668列166

6s

0.625s

0.232s

XXX_IC_FLOW_10

行16680列166

10.065s

0.148s/0.011s

XXX_IC_FLOW_100

行166800列166

90.398s

0.145s/0.045s

单表2

根据分析类查询的特点,一般仪表板select 3-5个字段足矣(多维查询则需要更多字段),所以这里统计查询3-5个字段的情况。

等值查询

单条查询 code或者pk

oracle

select pk_stordoc,code,name from t_od_bd_stordoc WHERE code='1020002';

SELECT pk_org,code,name FROM t_od_org_orgs WHERE pk_org = '1001A1100000000LX48O';

SELECT pk_material,code,name FROM t_od_bd_material WHERE code = '302550991000019';

SELECT cmaterialoid,cwarehouseid,dbilldate,ninnum,ncostmny FROM t_od_ic_flow WHERE pk_flow = '1001A11000000003KBHH';

SELECT cmaterialoid,cwarehouseid,dbilldate,ninnum,ncostmny FROM t_od_ic_flow_10 WHERE pk_flow = '1001A11000000003KBHH';

SELECT cmaterialoid,cwarehouseid,dbilldate,ninnum,ncostmny FROM t_od_ic_flow_100 WHERE pk_flow = '1001A11000000003KBHH';

create unique index uninx_pk_flow on t_od_ic_flow (pk_flow);

create index inx_pk_flow_10 on t_od_ic_flow_10 (pk_flow);

create index inx_pk_flow_100 on t_od_ic_flow_100 (pk_flow);

drop index uninx_pk_flow;

drop index inx_pk_flow_10;

drop index inx_pk_flow_100;

hive

select pk_org,code,name from ht_od_bd_stordoc WHERE code='1020002';

SELECT * FROM ht_od_org_orgs WHERE pk_org = '1001A1100000000LX48O';

SELECT * FROM ht_od_bd_material WHERE code = '302550991000019';

SELECT * FROM ht_od_ic_flow WHERE pk_flow = '1001A11000000003KBHH';

表名

返回量

无索引

用索引

hive

oracle

hive

oracle

XXX_BD_STORDOC

行1列45

0.982s/0.264s

0.117s

XXX_ORG_ORGS

行1列130

1s/0.272s

0.032s

XXX_BD_MATERIAL

行1列86

1s/0.855s

0.337s

0.02s

XXX_IC_FLOW

行1列166

7s/6s

2.816s

0.035s

XXX_IC_FLOW_10

行10列166

17.308s

0.024s

XXX_IC_FLOW_100

行100列166

108.944s

0.042s

结论:当前硬件配置下,表行数在百万以内,oracle即使没有索引,响应速度依然能够很快。百万、千万记录的表,走索引的查询和不走索引的查询,响应速度差别巨大。

hive行数上万后,响应速度过长。

模糊查询

少量查询 code模糊查询

oracle

select pk_stordoc,code,name from t_od_bd_stordoc WHERE code LIKE '10%'

SELECT pk_org,code,name FROM t_od_org_orgs WHERE code like '100%'

SELECT pk_material,code,name FROM t_od_bd_material WHERE code like '30255099%'

SELECT cmaterialoid,cwarehouseid,dbilldate,ninnum,ncostmny FROM t_od_ic_flow WHERE vbillcode like 'CR202308%'

SELECT cmaterialoid,cwarehouseid,dbilldate,ninnum,ncostmny FROM t_od_ic_flow_10 WHERE vbillcode like 'CR202308%'

SELECT cmaterialoid,cwarehouseid,dbilldate,ninnum,ncostmny FROM t_od_ic_flow_100 WHERE vbillcode like 'CR202308%'

CREATE INDEX inx_code ON T_OD_BD_MATERIAL (CODE);

CREATE INDEX inx_vbillcode ON T_OD_IC_FLOW (vbillcode );

select count(*) cc from (SELECT * FROM t_od_ic_flow_10 WHERE vbillcode like 'CR202308%')

select count(*) cc from (SELECT * FROM t_od_ic_flow_100 WHERE vbillcode like 'CR202308%')

hive

select * from ht_od_bd_stordoc WHERE code LIKE '10%'

SELECT * FROM ht_od_org_orgs WHERE code like '100%'

SELECT * FROM ht_od_bd_material WHERE code like '30255099%'

SELECT * FROM ht_od_ic_flow WHERE vbillcode like 'CR202308%'

SELECT * FROM ht_od_ic_flow_10 WHERE vbillcode like 'CR202308%'

SELECT * FROM ht_od_ic_flow_100 WHERE vbillcode like 'CR202308%'

select count(*) cc from (SELECT * FROM ht_od_ic_flow_10 WHERE vbillcode like 'CR202308%')

select count(*) cc from (SELECT * FROM ht_od_ic_flow_100 WHERE vbillcode like 'CR202308%')

表名

返回量

无索引

用索引

hive

oracle

hive

oracle

XXX_BD_STORDOC

行3列45

0.016s

XXX_ORG_ORGS

行13列130

0.022s

XXX_BD_MATERIAL

行191列86

0.13s

0.018s

XXX_IC_FLOW

行1834列166

0.901s

0.031s

XXX_IC_FLOW_10

行18340列166

11.723s

0.049s

XXX_IC_FLOW_100

行183400列166

117.365s

0.29s

结论:类似等值查询。

范围查询

少量查询 code范围查询

oracle

drop index inx_code

drop index inx_vbillcode

select pk_stordoc,code,name from t_od_bd_stordoc WHERE code >= 'DK01' AND code <= 'DK11'

SELECT pk_org,code,name FROM t_od_org_orgs WHERE code >= '10100' AND code <= '10200'

SELECT pk_material,code,name FROM t_od_bd_material WHERE code >= '201515201000003' AND code <= '201515901000003'

SELECT cmaterialoid,cwarehouseid,dbilldate,ninnum,ncostmny FROM t_od_ic_flow WHERE vbillcode >= 'CR2023080100000001' AND vbillcode <= 'CR2023083000000001'

SELECT cmaterialoid,cwarehouseid,dbilldate,ninnum,ncostmny FROM t_od_ic_flow_10 WHERE vbillcode >= 'CR2023080100000001' AND vbillcode <= 'CR2023083000000001'

SELECT cmaterialoid,cwarehouseid,dbilldate,ninnum,ncostmny FROM t_od_ic_flow_100 WHERE vbillcode >= 'CR2023080100000001' AND vbillcode <= 'CR2023083000000001'

CREATE INDEX inx_code ON T_OD_BD_MATERIAL (CODE);

CREATE INDEX inx_vbillcode ON T_OD_IC_FLOW (vbillcode );

hive

select pk_stordoc,code,name from ht_od_bd_stordoc WHERE code >= 'DK01' AND code <= 'DK11'

SELECT pk_org,code,name FROM ht_od_org_orgs WHERE code >= '10100' AND code <= '10200'

SELECT pk_material,code,name FROM ht_od_bd_material WHERE code >= '201515201000003' AND code <= '201515901000003'

SELECT cmaterialoid,cwarehouseid,dbilldate,ninnum,ncostmny FROM ht_od_ic_flow WHERE vbillcode >= 'CR2023080100000001' AND vbillcode <= 'CR2023083000000001'

表名

返回量

无索引

用索引

hive

oracle

hive

oracle

XXX_BD_STORDOC

行6列45

1s/0.139s

0.043s

XXX_ORG_ORGS

行69列130

1s/0.343s

0.039s

XXX_BD_MATERIAL

行999列86

1/0.502s

0.091s

0.031s

XXX_IC_FLOW

行1668列166

4s/3s

0.907s

0.031s

XXX_IC_FLOW_10

行16680列166

9.196s

0.029s

XXX_IC_FLOW_100

行166800列166

91.147s

0.08s

聚合查询

oracle

drop index inx_code

drop index inx_vbillcode

select count(*) from t_od_bd_stordoc WHERE code >= 'DK01' AND code <= 'DK11'

SELECT count(*) FROM t_od_org_orgs WHERE code >= '10100' AND code <= '10200'

SELECT count(*) FROM t_od_bd_material WHERE code >= '201515201000003' AND code <= '201515901000003'

SELECT sum(ncostmny),sum(ninnum) FROM t_od_ic_flow WHERE vbillcode >= 'CR2023080100000001' AND vbillcode <= 'CR2023083000000001'

SELECT sum(ncostmny),sum(ninnum) FROM t_od_ic_flow_10 WHERE vbillcode >= 'CR2023080100000001' AND vbillcode <= 'CR2023083000000001'

SELECT sum(ncostmny),sum(ninnum) FROM t_od_ic_flow_100 WHERE vbillcode >= 'CR2023080100000001' AND vbillcode <= 'CR2023083000000001'

CREATE INDEX inx_vbillcode ON T_OD_IC_FLOW (vbillcode );

hive

select count(*) from ht_od_bd_stordoc WHERE code >= 'DK01' AND code <= 'DK11'

SELECT count(*) FROM ht_od_org_orgs WHERE code >= '10100' AND code <= '10200'

SELECT count(*) FROM ht_od_bd_material WHERE code >= '201515201000003' AND code <= '201515901000003'

SELECT sum(ncostmny),sum(ninnum) FROM ht_od_ic_flow WHERE vbillcode >= 'CR2023080100000001' AND vbillcode <= 'CR2023083000000001'

表名

返回量

无索引

用索引

hive

oracle

hive

oracle

XXX_BD_STORDOC

行1列1

0.038s

XXX_ORG_ORGS

行1列1

0.024s

XXX_BD_MATERIAL

行1列1

0.118s

0.032s

XXX_IC_FLOW

行1列1

0.401s

0.059s

XXX_IC_FLOW_10

行1列1

9.371s

0.454s

XXX_IC_FLOW_100

行1列1

91.001s

58.89s

结论:查询ht_od_ic_flow时,有时会因内存崩溃而报错,详见hive聚合查询异常。oracle数据量达到千万级后,IO读写成为了瓶颈,所以即使加索引,耗时依然很久,甚至会出现超过不加索引时的耗时。同一会话多次执行同一sql,会有缓存,耗时会极大降低,即使千万级会降低至1.62s,即使清缓存,同样的sql语句依然是1.xxxs至3.xxxs,应该还有其他缓存机制。将SELECT sum(ncostmny),sum(ninnum) FROM ht_od_ic_flow_100 WHERE vbillcode >= 'CR2023080100000001' AND vbillcode <= 'CR2023083000000001'中的vbillcode起始改为CR202308xx00000001,速度依然很快,往前调个两三天0731、0730、0729,速度依然很快,维持在1.xxxs,或者至多不超过10s。

分析查询

oracle

SELECT pk_org,cmaterialoid,pk_flow,ninnum

,sum(ninnum) OVER (PARTITION BY cmaterialoid )

,CASE WHEN sum(ninnum) OVER (PARTITION BY cmaterialoid )!=0

THEN ninnum / sum(ninnum) OVER (PARTITION BY cmaterialoid )

END pp

FROM t_od_ic_flow WHERE vbillcode >= 'CR2023080100000001'

AND vbillcode <= 'CR2023083000000001'

SELECT pk_org,cmaterialoid,pk_flow,ninnum

,sum(ninnum) OVER (PARTITION BY cmaterialoid )

,CASE WHEN sum(ninnum) OVER (PARTITION BY cmaterialoid )!=0

THEN ninnum / sum(ninnum) OVER (PARTITION BY cmaterialoid )

END pp

FROM t_od_ic_flow_10 WHERE vbillcode >= 'CR2023080100000001'

AND vbillcode <= 'CR2023083000000001'

SELECT pk_org,cmaterialoid,pk_flow,ninnum

,sum(ninnum) OVER (PARTITION BY cmaterialoid )

,CASE WHEN sum(ninnum) OVER (PARTITION BY cmaterialoid )!=0

THEN ninnum / sum(ninnum) OVER (PARTITION BY cmaterialoid )

END pp

FROM t_od_ic_flow_100 WHERE vbillcode >= 'CR2023080100000001'

AND vbillcode <= 'CR2023083000000001'

CREATE INDEX inx_vbillcode ON T_OD_IC_FLOW (vbillcode );

hive

SELECT PK_ORG,CMATERIALOID,PK_FLOW,NINNUM,SUM(NINNUM) OVER (PARTITION BY CMATERIALOID )

,CASE WHEN SUM(NINNUM) OVER (PARTITION BY CMATERIALOID )!=0

THEN NINNUM / SUM(NINNUM) OVER (PARTITION BY CMATERIALOID )

END pp

FROM ht_od_ic_flow WHERE VBILLCODE >= 'CR2023080100000001'

AND VBILLCODE <= 'CR2023083000000001'

表名

返回量

无索引

用索引

hive

oracle

hive

oracle

XXX_IC_FLOW

行1668列6

0.375s

0.261s

XXX_IC_FLOW_10

行16680列6

9.016s

6.53s

XXX_IC_FLOW_100

行166800列6

91.337s

66.474s

多表

多表连接查询

分析查询

oracle

drop index inx_vbillcode

SELECT t1.pk_org,t2.code orgcode,t2.name orgname

,t1.cmaterialoid,t3.code materialcode,t3.name materialname

,t1.pk_flow,t1.ninnum

,sum(t1.ninnum) OVER (PARTITION BY t1.cmaterialoid )

,CASE WHEN sum(t1.ninnum) OVER (PARTITION BY t1.cmaterialoid )!=0

THEN t1.ninnum / sum(t1.ninnum) OVER (PARTITION BY t1.cmaterialoid )

END pp

FROM t_od_ic_flow t1

inner JOIN t_od_org_orgs t2 ON t1.pk_org = t2.pk_org

inner JOIN t_od_bd_material t3 ON t1.cmaterialoid = t3.pk_material

WHERE vbillcode >= 'CR2023080100000001'

AND vbillcode <= 'CR2023083000000001'

CREATE INDEX inx_vbillcode ON T_OD_IC_FLOW (vbillcode );

CREATE INDEX inx_vbillcode_10 ON T_OD_IC_FLOW_10 (vbillcode );

CREATE INDEX inx_vbillcode_100 ON T_OD_IC_FLOW_100 (vbillcode );

hive

SELECT t1.pk_org,t2.code orgcode,t2.name orgname

,t1.cmaterialoid,t3.code materialcode,t3.name materialname

,t1.pk_flow,t1.ninnum

,sum(t1.ninnum) OVER (PARTITION BY t1.cmaterialoid )

,CASE WHEN sum(t1.ninnum) OVER (PARTITION BY t1.cmaterialoid )!=0

THEN t1.ninnum / sum(t1.ninnum) OVER (PARTITION BY t1.cmaterialoid )

END pp

FROM ht_od_ic_flow t1

inner JOIN ht_od_org_orgs t2 ON t1.pk_org = t2.pk_org

inner JOIN ht_od_bd_material t3 ON t1.cmaterialoid = t3.pk_material

WHERE vbillcode >= 'CR2023080100000001'

AND vbillcode <= 'CR2023083000000001'

表名

返回量

无索引

用索引

hive

oracle

hive

oracle

XXX_IC_FLOW

行1668列10

0.555s

0.266s

XXX_IC_FLOW_10

行16680列10

9.358s

0.338s

XXX_IC_FLOW_100

行166800列10

92.048s

92.019s

orcle数据达到千万级时,有无索引,响应时间几乎没有差别,此时瓶颈应该在硬件配置上。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/35207.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

专业140+总分420+上海交通大学819考研经验上交电子信息与通信工程,真题,大纲,参考书。博睿泽信息通信考研论坛,信息通信考研Jenny

考研结束&#xff0c;专业819信号系统与信号处理140&#xff0c;总分420&#xff0c;终于梦圆交大&#xff0c;高考时敢都不敢想目标&#xff0c;现在已经成为现实&#xff0c;考研后劲很大&#xff0c;这一年的复习经历&#xff0c;还是历历在目&#xff0c;整理一下&#xff…

K8S服务突然中断无法访问:报The node had condition: [DiskPressure]异常

一、背景 程序在运行过程中&#xff0c;突然无法访问&#xff0c;发现后台接口也无法访问&#xff1b;查看kuboard&#xff0c;发现报如下异常&#xff1a;The node had condition: [DiskPressure]. 继续查看磁盘使用率&#xff0c;发现系统盘使用率已经高达93%。问题前后呼应…

【工具变量】上市公司企业违规数据(企业当年是否违规、企业当年违规的次数)2000-2022年

一、测算方式&#xff1a;参考C刊《当代财经》纪亚方&#xff08;2023&#xff09;老师的研究&#xff0c;通过对上市公司被处罚涉及的年份进行追溯&#xff0c;为了保证企业违规行为变量度量的准确性&#xff0c;将追溯到公司被处罚的年份定义为违规年份。 采用两个指标对企业…

视频孪生携手视联网 智汇云舟亮相中国电信2024数字科技生态大会

12月3日&#xff0c;由中国电信主办的“2024数字科技生态大会”在广州盛大开幕。活动现场&#xff0c;前沿科技与创新理念交相辉映&#xff0c;数字科技未来蓝图徐徐展开。智汇云舟作为中国电信的战略合作伙伴&#xff0c;受邀出席本次活动。 展会期间&#xff0c;以“天翼视联…

Unity 使用LineRenderer制作模拟2d绳子

效果展示&#xff1a; 实现如下&#xff1a; 首先&#xff0c;直接上代码&#xff1a; using System.Collections; using System.Collections.Generic; using UnityEngine;public class LineFourRender : MonoBehaviour {public Transform StartNode;public Transform MidNod…

力扣-图论-4【算法学习day.54】

前言 ###我做这类文章一个重要的目的还是给正在学习的大家提供方向和记录学习过程&#xff08;例如想要掌握基础用法&#xff0c;该刷哪些题&#xff1f;&#xff09;我的解析也不会做的非常详细&#xff0c;只会提供思路和一些关键点&#xff0c;力扣上的大佬们的题解质量是非…

【射频IC进阶实践教程】2.6 LNA版图设计及DRC/LVS验证

射频集成电路的版图设计非常关键&#xff0c;他对寄生参数非常敏感&#xff0c;需要使其最小化。还需要注意相互耦合的方式本次课程主要介绍射频IC的一些相关布局和连线方面的考虑。 一、版图设计 1. 版图的元件布局 首先打开对应的原理图 点击进行版图设计 由于已经有做好的…

uviewplus中的时间单选框up-datetime-picker的在uni-app+vue3的使用方法

uviewplus中的时间单选框up-datetime-picker的使用方法 前言 在实际开发中,我们经常需要使用时间选择器来让用户选择特定的时间。本文将详细介绍uviewplus中up-datetime-picker组件的使用方法,特别是在处理年月选择时的一些关键实现&#xff0c;因为官方有很多相关的功能和方法…

Spring Bean 的生命周期和获取方式

优质博文&#xff1a;IT-BLOG-CN 一、Spring Bean 的生命周期&#xff0c;如何被管理的 对于普通的 Java对象&#xff0c;当 new的时候创建对象&#xff0c;当它没有任何引用的时候被垃圾回收机制回收。而由 Spring IoC容器托管的对象&#xff0c;它们的生命周期完全由容器控…

【Spring MVC篇】返回响应

个人主页&#xff1a;兜里有颗棉花糖 欢迎 点赞&#x1f44d; 收藏✨ 留言✉ 加关注&#x1f493;本文由 兜里有颗棉花糖 原创 收录于专栏【Spring MVC】 本专栏旨在分享学习Spring MVC的一点学习心得&#xff0c;欢迎大家在评论区交流讨论&#x1f48c; 目录 一、返回静态页面…

使用Python创建API服务器并打包成exe文件

本文来记录下使用Python创建API服务器并打包成exe文件 文章目录 概述简述API服务器创建打包API服务器为exe文件本文小结 概述 在软件开发中&#xff0c;API服务器是连接前端和后端服务的桥梁&#xff0c;而Python因其丰富的库和框架&#xff0c;如Flask、Django等&#xff0c;成…

MHA切换过程

MHA&#xff08;Master High Availability&#xff09;是一套用于MySQL数据库的高可用性解决方案&#xff0c;它能够在主服务器发生故障时自动将一个从服务器提升为新的主服务器&#xff0c;从而实现数据库服务的持续可用。MHA的切换过程主要包括以下几个步骤&#xff1a; 1. …

NextUI 教程:打造美观高效的React UI

NextUI 教程&#xff1a;打造美观高效的React UI 项目地址:https://gitcode.com/gh_mirrors/ne/nextui 1. 项目介绍 NextUI 是一个轻量级、快速且现代化的React UI库&#xff0c;提供了一系列优雅的组件以帮助开发者构建令人印象深刻的Web应用。它注重性能和用户体验&#x…

Python和Java后端开发技术对比

在当今互联网技术飞速发展的时代&#xff0c;后端开发扮演着至关重要的角色。Python和Java作为两大主流的后端开发语言&#xff0c;各自具备独特的优势和应用场景。让我们深入了解这两种技术的特点和选择建议。 Java后端开发一直是企业级应用的首选方案。它以强大的类型系统、…

Java HashMap

HashMap 是一个散列表&#xff0c;它存储的内容是键值对(key-value)映射。 HashMap 实现了 Map 接口&#xff0c;根据键的 HashCode 值存储数据&#xff0c;具有很快的访问速度&#xff0c;最多允许一条记录的键为 null&#xff0c;不支持线程同步。 HashMap 是无序的&#x…

模型案例:| 帐篷检测模型!

导读 2023年以ChatGPT为代表的大语言模型横空出世&#xff0c;它的出现标志着自然语言处理领域取得了重大突破。它在文本生成、对话系统和语言理解等方面展现出了强大的能力&#xff0c;为人工智能技术的发展开辟了新的可能性。同时&#xff0c;人工智能技术正在进入各种应用领…

实验日志——DETR

DETR训练日志 1. 代码来源 代码源自作者的Github: https://github.com/facebookresearch/detr?tabreadme-ov-file 2. 数据来源 在DETR中只使用了COCO2017数据集&#xff0c;其中训练集有118288张图像&#xff0c;验证集有5001张数据&#xff0c;测试集有40671张数据&#…

18、IO流:

18、IO流&#xff1a; 这一章很枯燥无聊~ 文件&#xff1a; 什么是文件&#xff1a; 文件&#xff0c;对我们并不陌生&#xff0c;文件时保存数据的地方&#xff0c;比如我们经常使用的word文档&#xff0c;txt文档&#xff0c;excel文档…都是文件。它既可以保存一张图片&…

24.两两交换链表中的节点 python

两两交换链表中的节点 题目题目描述示例 1&#xff1a;示例 2&#xff1a;示例 3&#xff1a;提示&#xff1a;题目链接 题解解题思路python实现代码解读提交结果 题目 题目描述 给你一个链表&#xff0c;两两交换其中相邻的节点&#xff0c;并返回交换后链表的头节点。你必须…

解决 git 报错 “fatal: unable to access ‘https://github.com/.../.git‘: Recv failure Connection was rese

目录 前言 方法一&#xff1a;取消代理设置 方法二&#xff1a;设置系统代理&#xff08;推荐&#xff09; 方法三 方法四&#xff1a;不挂梯子时 前言 在使用 Git/Git小乌龟 进行代码管理的过程中&#xff0c;经常会遇到各种各样的问题&#xff0c;其中之一就是在执行 g…