[20190524]使用use_concat or_expand提示优化.txt
[20190524]使用use_concat or_expand提示优化.txt
--//上午看了链接https://connor-mcdonald.com/2019/05/22/being-generous-to-the-optimizer,突然想起我们生产系统类似语句。
--//现在想想觉得开发的想象力太丰富,写这些语句是否考虑长期运行导致的结果。对方例子相对简单,我优化的例子简直就是变态。
--//链接:[20150814]使用use_concat提示.txt => http://blog.itpub.net/267265/viewspace-1771727/
--//实际上看了马上想到使用use_concat or_expand提示优化sql语句.同时看了链接
--//https://jonathanlewis.wordpress.com/2019/05/22/danger-hints/,一起测试看看。
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
create table address ( street int, suburb int, post_code int, data char(100));
insert into address select mod(rownum,1e4), mod(rownum,10), mod(rownum,1e2), rownum from dual connect by level <= 1e5;
commit;
exec dbms_stats.gather_table_stats('','ADDRESS')
create index i_address_stress on address ( street );
create index i_address_suburb on address ( suburb );
create index i_address_post_code on address ( post_code );
2.测试:
variable val number = 6
variable choice number = 1
alter session set statistics_level = all;
SCOTT@test01p> select data from address where ( :choice = 1 and street = :val ) or ( :choice = 2 and suburb = :val );
DATA
-----
6
10006
20006
30006
40006
50006
60006
70006
80006
90006
10 rows selected.
Plan hash value: 3645838471
-----------------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Starts | E-Rows |E-Bytes| Cost (%CPU)| E-Time | A-Rows | A-Time | Buffers |
-----------------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | | | 445 (100)| | 10 |00:00:00.02 | 1636 |
|* 1 | TABLE ACCESS FULL| ADDRESS | 1 | 100 | 10800 | 445 (1)| 00:00:01 | 10 |00:00:00.02 | 1636 |
-----------------------------------------------------------------------------------------------------------------------
Query Block Name / Object Alias (identified by operation id):
-------------------------------------------------------------
1 - SEL$1 / ADDRESS@SEL$1
Peeked Binds (identified by position):
--------------------------------------
2 - :2 (NUMBER): 6
4 - :2 (NUMBER, Primary=2)
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter(((:CHOICE=2 AND "SUBURB"=:VAL) OR ("STREET"=:VAL AND :CHOICE=1)))
--//选择全表扫描.加入提示:/*+ or_expand(@sel$1) */
select /*+ or_expand(@sel$1) */ data from address where ( :choice = 1 and street = :val ) or ( :choice = 2 and suburb = :val );
SCOTT@test01p> @ dpc '' outline
Plan hash value: 1427591975
--------------------------------------------------------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Starts | E-Rows |E-Bytes| Cost (%CPU)| E-Time | A-Rows | A-Time | Buffers | Reads |
--------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | | | 456 (100)| | 10 |00:00:00.06 | 13 | 4 |
| 1 | VIEW | VW_ORE_B7380F92 | 1 | 10010 | 997K| 456 (1)| 00:00:01 | 10 |00:00:00.06 | 13 | 4 |
| 2 | UNION-ALL | | 1 | | | | | 10 |00:00:00.06 | 13 | 4 |
|* 3 | FILTER | | 1 | | | | | 10 |00:00:00.06 | 13 | 4 |
| 4 | TABLE ACCESS BY INDEX ROWID BATCHED| ADDRESS | 1 | 10 | 1050 | 11 (0)| 00:00:01 | 10 |00:00:00.06 | 13 | 4 |
|* 5 | INDEX RANGE SCAN | I_ADDRESS_STRESS | 1 | 10 | | 1 (0)| 00:00:01 | 10 |00:00:00.06 | 3 | 4 |
|* 6 | FILTER | | 1 | | | | | 0 |00:00:00.01 | 0 | 0 |
|* 7 | TABLE ACCESS FULL | ADDRESS | 0 | 10000 | 1054K| 445 (1)| 00:00:01 | 0 |00:00:00.01 | 0 | 0 |
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Query Block Name / Object Alias (identified by operation id):
-------------------------------------------------------------
1 - SET$9162BF3C / VW_ORE_B7380F92@SEL$B7380F92
2 - SET$9162BF3C
3 - SET$9162BF3C_1
4 - SET$9162BF3C_1 / ADDRESS@SEL$1
5 - SET$9162BF3C_1 / ADDRESS@SEL$1
6 - SET$9162BF3C_2
7 - SET$9162BF3C_2 / ADDRESS@SEL$1
Outline Data
-------------
/*+
BEGIN_OUTLINE_DATA
IGNORE_OPTIM_EMBEDDED_HINTS
OPTIMIZER_FEATURES_ENABLE('12.2.0.1')
DB_VERSION('12.2.0.1')
ALL_ROWS
OUTLINE_LEAF(@"SET$9162BF3C_2")
OUTLINE_LEAF(@"SET$9162BF3C_1")
OUTLINE_LEAF(@"SET$9162BF3C")
OR_EXPAND(@"SEL$1" (1) (2))
OUTLINE_LEAF(@"SEL$B7380F92")
OUTLINE(@"SET$9162BF3C")
OR_EXPAND(@"SEL$1" (1) (2))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OUTLINE(@"SEL$1")
NO_ACCESS(@"SEL$B7380F92" "VW_ORE_B7380F92"@"SEL$B7380F92")
INDEX_RS_ASC(@"SET$9162BF3C_1" "ADDRESS"@"SEL$1" ("ADDRESS"."STREET"))
BATCH_TABLE_ACCESS_BY_ROWID(@"SET$9162BF3C_1" "ADDRESS"@"SEL$1")
FULL(@"SET$9162BF3C_2" "ADDRESS"@"SEL$1")
END_OUTLINE_DATA
*/
Peeked Binds (identified by position):
--------------------------------------
2 - :2 (NUMBER): 6
4 - :2 (NUMBER, Primary=2)
Predicate Information (identified by operation id):
---------------------------------------------------
3 - filter(:CHOICE=1)
5 - access("STREET"=:VAL)
6 - filter(:CHOICE=2)
7 - filter(("SUBURB"=:VAL AND (LNNVL(:CHOICE=1) OR LNNVL("STREET"=:VAL))))
--//注意看下划线.
--//但是使用下划线提示,改动代码的情况下如何呢?
SELECT /*+ or_expand(@sel$1 (1) (2) ) */ data
FROM address
WHERE ( :choice = 1 AND street = :val )
OR ( :choice = 2 AND suburb = :val )
OR ( :choice = 3 AND post_code = :val);
SCOTT@test01p> @ dpc '' outline
...
Plan hash value: 1427591975
-----------------------------------------------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Starts | E-Rows |E-Bytes| Cost (%CPU)| E-Time | A-Rows | A-Time | Buffers |
-----------------------------------------------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | | | 456 (100)| | 10 |00:00:00.01 | 13 |
| 1 | VIEW | VW_ORE_B7380F92 | 1 | 10010 | 997K| 456 (1)| 00:00:01 | 10 |00:00:00.01 | 13 |
| 2 | UNION-ALL | | 1 | | | | | 10 |00:00:00.01 | 13 |
|* 3 | FILTER | | 1 | | | | | 10 |00:00:00.01 | 13 |
| 4 | TABLE ACCESS BY INDEX ROWID BATCHED| ADDRESS | 1 | 10 | 1050 | 11 (0)| 00:00:01 | 10 |00:00:00.01 | 13 |
|* 5 | INDEX RANGE SCAN | I_ADDRESS_STRESS | 1 | 10 | | 1 (0)| 00:00:01 | 10 |00:00:00.01 | 3 |
|* 6 | FILTER | | 1 | | | | | 0 |00:00:00.01 | 0 |
|* 7 | TABLE ACCESS FULL | ADDRESS | 0 | 10000 | 1054K| 445 (1)| 00:00:01 | 0 |00:00:00.01 | 0 |
-----------------------------------------------------------------------------------------------------------------------------------------------------
Query Block Name / Object Alias (identified by operation id):
-------------------------------------------------------------
1 - SET$9162BF3C / VW_ORE_B7380F92@SEL$B7380F92
2 - SET$9162BF3C
3 - SET$9162BF3C_1
4 - SET$9162BF3C_1 / ADDRESS@SEL$1
5 - SET$9162BF3C_1 / ADDRESS@SEL$1
6 - SET$9162BF3C_2
7 - SET$9162BF3C_2 / ADDRESS@SEL$1
Outline Data
-------------
/*+
BEGIN_OUTLINE_DATA
IGNORE_OPTIM_EMBEDDED_HINTS
OPTIMIZER_FEATURES_ENABLE('12.2.0.1')
DB_VERSION('12.2.0.1')
ALL_ROWS
OUTLINE_LEAF(@"SET$9162BF3C_2")
OUTLINE_LEAF(@"SET$9162BF3C_1")
OUTLINE_LEAF(@"SET$9162BF3C")
OR_EXPAND(@"SEL$1" (1) (2))
OUTLINE_LEAF(@"SEL$B7380F92")
OUTLINE(@"SET$9162BF3C")
OR_EXPAND(@"SEL$1" (1) (2))
OUTLINE(@"SEL$1")
NO_ACCESS(@"SEL$B7380F92" "VW_ORE_B7380F92"@"SEL$B7380F92")
INDEX_RS_ASC(@"SET$9162BF3C_1" "ADDRESS"@"SEL$1" ("ADDRESS"."STREET"))
BATCH_TABLE_ACCESS_BY_ROWID(@"SET$9162BF3C_1" "ADDRESS"@"SEL$1")
FULL(@"SET$9162BF3C_2" "ADDRESS"@"SEL$1")
END_OUTLINE_DATA
*/
Peeked Binds (identified by position):
--------------------------------------
2 - :2 (NUMBER): 6
4 - :2 (NUMBER, Primary=2)
Predicate Information (identified by operation id):
---------------------------------------------------
3 - filter(:CHOICE=1)
5 - access("STREET"=:VAL)
6 - filter(:CHOICE=2)
7 - filter(("SUBURB"=:VAL AND (LNNVL(:CHOICE=1) OR LNNVL("STREET"=:VAL))))
--//正像链接讲的那样如果增加1个或条件,导致执行计划变得不合理.实际上跟严重的是查询发生了错误.
--//如果仔细看Predicate Information 就很容易发现没有:CHOICE=1的filter.如果查询:
SCOTT@test01p> variable choice number = 3
SELECT /*+ or_expand(@sel$1 (1) (2) ) */ data
FROM address
WHERE ( :choice = 1 AND street = :val )
OR ( :choice = 2 AND suburb = :val )
OR ( :choice = 3 AND post_code = :val);
no rows selected.
--//取消提示:
SELECT data FROM address WHERE ( :choice = 1 AND street = :val ) OR ( :choice = 2 AND suburb = :val ) OR ( :choice = 3 AND post_code = :val);
...
1000 rows selected.
--//两者的结果集不一样.明显这个是一个bug.
修改如下:
SELECT /*+ or_expand(@sel$1 (1) (2) (3) ) */ data
FROM address
WHERE ( :choice = 1 AND street = :val )
OR ( :choice = 2 AND suburb = :val )
OR ( :choice = 3 AND post_code = :val);
...
--//注使用提示/*+ or_expand(@sel$1 ) */结果是正确的.
SCOTT@test01p> @ dpc '' outline
Plan hash value: 3525475520
-----------------------------------------------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Starts | E-Rows |E-Bytes| Cost (%CPU)| E-Time | A-Rows | A-Time | Buffers |
-----------------------------------------------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | | | 900 (100)| | 1000 |00:00:00.02 | 1640 |
| 1 | VIEW | VW_ORE_B7380F92 | 1 | 11009 | 1096K| 900 (1)| 00:00:01 | 1000 |00:00:00.02 | 1640 |
| 2 | UNION-ALL | | 1 | | | | | 1000 |00:00:00.02 | 1640 |
|* 3 | FILTER | | 1 | | | | | 0 |00:00:00.01 | 0 |
| 4 | TABLE ACCESS BY INDEX ROWID BATCHED| ADDRESS | 0 | 10 | 1050 | 11 (0)| 00:00:01 | 0 |00:00:00.01 | 0 |
|* 5 | INDEX RANGE SCAN | I_ADDRESS_STRESS | 0 | 10 | | 1 (0)| 00:00:01 | 0 |00:00:00.01 | 0 |
|* 6 | FILTER | | 1 | | | | | 0 |00:00:00.01 | 0 |
|* 7 | TABLE ACCESS FULL | ADDRESS | 0 | 10000 | 1054K| 445 (1)| 00:00:01 | 0 |00:00:00.01 | 0 |
|* 8 | FILTER | | 1 | | | | | 1000 |00:00:00.02 | 1640 |
|* 9 | TABLE ACCESS FULL | ADDRESS | 1 | 999 | 108K| 445 (1)| 00:00:01 | 1000 |00:00:00.02 | 1640 |
-----------------------------------------------------------------------------------------------------------------------------------------------------
Query Block Name / Object Alias (identified by operation id):
-------------------------------------------------------------
1 - SET$49E1C21B / VW_ORE_B7380F92@SEL$B7380F92
2 - SET$49E1C21B
3 - SET$49E1C21B_1
4 - SET$49E1C21B_1 / ADDRESS@SEL$1
5 - SET$49E1C21B_1 / ADDRESS@SEL$1
6 - SET$49E1C21B_2
7 - SET$49E1C21B_2 / ADDRESS@SEL$1
8 - SET$49E1C21B_3
9 - SET$49E1C21B_3 / ADDRESS@SEL$1
Outline Data
-------------
/*+
BEGIN_OUTLINE_DATA
IGNORE_OPTIM_EMBEDDED_HINTS
OPTIMIZER_FEATURES_ENABLE('12.2.0.1')
DB_VERSION('12.2.0.1')
ALL_ROWS
OUTLINE_LEAF(@"SET$49E1C21B_3")
OUTLINE_LEAF(@"SET$49E1C21B_2")
OUTLINE_LEAF(@"SET$49E1C21B_1")
OUTLINE_LEAF(@"SET$49E1C21B")
OR_EXPAND(@"SEL$1" (1) (2) (3))
OUTLINE_LEAF(@"SEL$B7380F92")
OUTLINE(@"SET$49E1C21B")
OR_EXPAND(@"SEL$1" (1) (2) (3))
OUTLINE(@"SEL$1")
NO_ACCESS(@"SEL$B7380F92" "VW_ORE_B7380F92"@"SEL$B7380F92")
INDEX_RS_ASC(@"SET$49E1C21B_1" "ADDRESS"@"SEL$1" ("ADDRESS"."STREET"))
BATCH_TABLE_ACCESS_BY_ROWID(@"SET$49E1C21B_1" "ADDRESS"@"SEL$1")
FULL(@"SET$49E1C21B_2" "ADDRESS"@"SEL$1")
FULL(@"SET$49E1C21B_3" "ADDRESS"@"SEL$1")
END_OUTLINE_DATA
*/
Peeked Binds (identified by position):
--------------------------------------
2 - :2 (NUMBER): 6
4 - :2 (NUMBER, Primary=2)
6 - :2 (NUMBER, Primary=2)
Predicate Information (identified by operation id):
---------------------------------------------------
3 - filter(:CHOICE=1)
5 - access("STREET"=:VAL)
6 - filter(:CHOICE=2)
7 - filter(("SUBURB"=:VAL AND (LNNVL(:CHOICE=1) OR LNNVL("STREET"=:VAL))))
8 - filter(:CHOICE=3)
9 - filter(("POST_CODE"=:VAL AND (LNNVL(:CHOICE=1) OR LNNVL("STREET"=:VAL)) AND (LNNVL(:CHOICE=2) OR LNNVL("SUBURB"=:VAL))))
3.测试使用use_concate看看:
set linesize 100
SELECT /*+ use_concat */ data
FROM address
WHERE ( :choice = 1 AND street = :val )
OR ( :choice = 2 AND suburb = :val )
OR ( :choice = 3 AND post_code = :val);
SCOTT@test01p> @ dpc '' outline
...
Plan hash value: 2048882018
----------------------------------------------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Starts | E-Rows |E-Bytes| Cost (%CPU)| E-Time | A-Rows | A-Time | Buffers |
----------------------------------------------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | | | 900 (100)| | 1000 |00:00:00.01 | 1640 |
| 1 | CONCATENATION | | 1 | | | | | 1000 |00:00:00.01 | 1640 |
|* 2 | FILTER | | 1 | | | | | 0 |00:00:00.01 | 0 |
| 3 | TABLE ACCESS BY INDEX ROWID BATCHED| ADDRESS | 0 | 10 | 1110 | 11 (0)| 00:00:01 | 0 |00:00:00.01 | 0 |
|* 4 | INDEX RANGE SCAN | I_ADDRESS_STRESS | 0 | 10 | | 1 (0)| 00:00:01 | 0 |00:00:00.01 | 0 |
|* 5 | FILTER | | 1 | | | | | 1000 |00:00:00.01 | 1640 |
|* 6 | TABLE ACCESS FULL | ADDRESS | 1 | 1000 | 108K| 445 (1)| 00:00:01 | 1000 |00:00:00.01 | 1640 |
|* 7 | FILTER | | 1 | | | | | 0 |00:00:00.01 | 0 |
|* 8 | TABLE ACCESS FULL | ADDRESS | 0 | 9999 | 1083K| 445 (1)| 00:00:01 | 0 |00:00:00.01 | 0 |
----------------------------------------------------------------------------------------------------------------------------------------------------
Query Block Name / Object Alias (identified by operation id):
-------------------------------------------------------------
1 - SEL$1
3 - SEL$1_1 / ADDRESS@SEL$1
4 - SEL$1_1 / ADDRESS@SEL$1
6 - SEL$1_2 / ADDRESS@SEL$1_2
8 - SEL$1_3 / ADDRESS@SEL$1_3
Outline Data
-------------
/*+
BEGIN_OUTLINE_DATA
IGNORE_OPTIM_EMBEDDED_HINTS
OPTIMIZER_FEATURES_ENABLE('12.2.0.1')
DB_VERSION('12.2.0.1')
ALL_ROWS
OUTLINE_LEAF(@"SEL$1")
OUTLINE_LEAF(@"SEL$1_1")
USE_CONCAT(@"SEL$1" 8 OR_PREDICATES(1) PREDICATE_REORDERS((5 2) (6 3) (7 4) (8 5) (9 6) (10 7) (2 8) (4 9) (3 10)))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--//始终不明白里面那一串表示什么?
OUTLINE_LEAF(@"SEL$1_2")
OUTLINE_LEAF(@"SEL$1_3")
OUTLINE(@"SEL$1")
INDEX_RS_ASC(@"SEL$1_1" "ADDRESS"@"SEL$1" ("ADDRESS"."STREET"))
BATCH_TABLE_ACCESS_BY_ROWID(@"SEL$1_1" "ADDRESS"@"SEL$1")
FULL(@"SEL$1_2" "ADDRESS"@"SEL$1_2")
FULL(@"SEL$1_3" "ADDRESS"@"SEL$1_3")
END_OUTLINE_DATA
*/
Peeked Binds (identified by position):
--------------------------------------
2 - :2 (NUMBER): 6
4 - :2 (NUMBER, Primary=2)
6 - :2 (NUMBER, Primary=2)
Predicate Information (identified by operation id):
---------------------------------------------------
2 - filter(:CHOICE=1)
4 - access("STREET"=:VAL)
5 - filter(:CHOICE=3)
6 - filter(("POST_CODE"=:VAL AND (LNNVL("STREET"=:VAL) OR LNNVL(:CHOICE=1))))
7 - filter(:CHOICE=2)
8 - filter(("SUBURB"=:VAL AND (LNNVL(:CHOICE=3) OR LNNVL("POST_CODE"=:VAL)) AND (LNNVL("STREET"=:VAL) OR LNNVL(:CHOICE=1))))
[20190524]使用use_concat or_expand提示优化.txt的更多相关文章
- [20181220]使用提示OR_EXPAND优化.txt
[20181220]使用提示OR_EXPAND优化.txt --//链接http://www.itpub.net/thread-2107240-2-1.html,http://www.itpub.ne ...
- [20191213]toad 12下BIND_AWARE提示无效.txt
[20191213]toad 12下BIND_AWARE提示无效.txt --//链接http://blog.itpub.net/267265/viewspace-2130781/的测试,发现当时测试 ...
- [20181116]18c DML 日志优化.txt
[20181116]18c DML 日志优化.txt 1.环境:xxxxxxxx> select banner_full from v$version;BANNER_FULL---------- ...
- [20200223]关于latch and mutext的优化.txt
[20200223]关于latch and mutext的优化.txt --//前一段时间一直在测试使用DBMS_SHARED_POOL.MARKHOT标识热对象以及sql语句的优化.--//有别人问 ...
- SQL Server 利用锁提示优化Row_number()-程序员需知
网站中一些老页面仍采用Row_number类似的开窗函数进行分页处理,此时如果遭遇挖坟帖的情形可能就需要漫长的等待且消耗巨大.这里给大家介绍根据Row_number()特性采用特定锁Hint提升查询速 ...
- 利用查询提示优化SQL
数据库环境:SQL SERVER 2005 我们来看一下SQL语句及对应的数据量 SELECT COUNT(*) FROM cinvout_02 a WHERE ( a.dept_id IN ( SE ...
- eclipse代码提示优化
用Eclipse编写Android程序的代码提示功能主要是在java和xml文件中,有时候会失效,默认的提示功能有限. 1)java文件自动提示 Window->Preferences ...
- cognos report利用文本框提示优化日期维度
为了尽量减少手工对日期维度的维护,在日期维度表中年份已经到了2099年,把年份作为下拉框或者月份作为下拉框的时候,选择起来颇为麻烦(当然也可以在此基础之上设置默认为当前月) 如图:提示页面以及html ...
- eclipse智能提示优化
1.Windows→Preferences→Java→Editor→Content Assist 其中的AutoActivation Delay默认值为200(单位是毫秒)也就是说在打“.”之后停留2 ...
随机推荐
- git操作教程
首先就是创建码云(用户名不能是中文),然后新建一个项目(用户名/项目名都不能是中文). 一.在Windows上安装Git 1.从http://msysgit.github.io下载,然后按默认选项安装 ...
- 松软科技web课堂:SQLServer之LEN() 函数
LEN() 函数 LEN 函数返回文本字段中值的长度. SQL LEN() 语法 SELECT LEN(column_name) FROM table_name SQL LEN() 实例 我们拥有下面 ...
- SpringCloud之Eureka:服务发布与调用例子
Eureka是Netflix开发的服务发现框架,本身是一个基于REST的服务,主要用于定位运行在AWS域中的中间层服务,以达到负载均衡和中间层服务故障转移的目的. SpringCloud将它集成在其子 ...
- Thymeleaf常用语法:使用星号表达式
在处理模板时,一般情况都是使用变量表达式 ${...} 来显示变量,还可以使用选定对象表达式 *{...},它也称为星号表达式.如果在模板中先选定了对象,则需要使用星号表达式.Thymeleaf的内置 ...
- SSH远程管理
目录 SSH远程管理 ssh功能 SSH相关命令 Xshell连接不上虚拟机 scp命令 SSH验证方式 优化 免交互expect[扩展] 免交互sshpass[扩展] 简易跳板机 小结 SSH远程管 ...
- hadoop节点动态删除与增加
动态删除 1)修改配置文件 修改hdfs-site.xml文件,适当减小dfs.replication的数量,增加dfs.hosts.exclude选项 vi hdfs-site.xml <pr ...
- 添加数据库数据后(SVN的更新和启动)、SVN启动
一.添加数据库数据: 1.修改Excel表格,添加字段 2.修改数据库,添加字段 3.修改程序 4.使用Excel生成Tabletotable文件,并修改生成文件的内容. (1)删除cpp文件所有的H ...
- java8-03-Lambda表达式总结
Lambda 表达式的语法格式 基本结构 () -> {} 左侧 参数列表 右侧 方法体 (Lambda体) 1.无 ...
- acwing 55. 连续子数组的最大和
地址 https://www.acwing.com/problem/content/50/ 输入一个 非空 整型数组,数组里的数可能为正,也可能为负. 数组中一个或连续的多个整数组成一个子数组. 求 ...
- 七夕节 (HDU - 1215) 【简单数论】【找因数】
七夕节 (HDU - 1215) [简单数论][找因数] 标签: 入门讲座题解 数论 题目描述 七夕节那天,月老来到数字王国,他在城门上贴了一张告示,并且和数字王国的人们说:"你们想知道你们 ...