首页 > 其他分享 >查看 OceanBase 执行计划

查看 OceanBase 执行计划

时间:2024-03-10 12:11:07浏览次数:28  
标签:INFO 10 00 查看 OceanBase Term 执行 bmsql id

使用benchmarksql压测数据库,产生高消耗的sql并测试数据库性能

压测环境部署

benchmarksql下载

git clone https://github.com/meiq4096/benchmarksql-5.0.git

修改配置文件

vi ./run/props.ob

db=oracle
driver=com.alipay.oceanbase.obproxy.mysql.jdbc.Driver
conn=jdbc:oceanbase://192.168.56.20:2883/tpcc?useUnicode=true&characterEncoding=utf-8
user=datax@mq_t1
password=datax

warehouses=2
loadWorkers=2

terminals=5
//To run specified transactions per terminal- runMins must equal zero
runTxnsPerTerminal=0
//To run for specified minutes- runTxnsPerTerminal must equal zero
runMins=3
//Number of total transactions per minute
limitTxnsPerMin=0

//Set to true to run in 4.x compatible mode. Set to false to use the
//entire configured database evenly.
terminalWarehouseFixed=true

//The following five values must add up to 100
newOrderWeight=45
paymentWeight=43
orderStatusWeight=4
deliveryWeight=4
stockLevelWeight=4

// Directory name to create for collecting detailed result data.
// Comment this out to suppress.
resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
osCollectorScript=./misc/os_collector_linux.py
osCollectorInterval=1

数据准备

建表

[root@innodb-cluster01 run]# sh runSQL.sh props.ob sql.common/tableCreates.sql 
runSQL.sh: line 14: source: funcs.sh: file not found


--问题
runSQL.sh 提示行数的funcs.sh改为绝对路径

调整数据库参数

set global autocommit=ON;
set global ob_query_timeout=36000000000;
set global ob_trx_timeout=36000000000;
set global max_allowed_packet=67108864;
set global ob_sql_work_area_percentage=100;
set global parallel_servers_target=800;

装载数据

[root@innodb-cluster01 run]# sh runLoader.sh props.ob
runLoader.sh: line 8: source: funcs.sh: file not found

--问题
runLoader.sh 提示行数的funcs.sh改为绝对路径

Starting BenchmarkSQL LoadData

driver=com.alipay.oceanbase.obproxy.mysql.jdbc.Driver
conn=jdbc:oceanbase://192.168.56.20:2883/tpcc?useUnicode=true&characterEncoding=utf-8
user=datax@mq_t1
password=***********
warehouses=2
loadWorkers=2
fileLocation (not defined)
csvNullValue (not defined - using default 'NULL')

Worker 000: Loading ITEM
Worker 001: Loading Warehouse      1
Worker 000: Loading ITEM done
Worker 000: Loading Warehouse      2
Worker 001: Loading Warehouse      1 done
Worker 000: Loading Warehouse      2 done

创建索引

cat sql.common/indexCreates.sql 

alter table bmsql_warehouse add constraint bmsql_warehouse_pkey
  primary key (w_id);

alter table bmsql_district add constraint bmsql_district_pkey
  primary key (d_w_id, d_id);

alter table bmsql_customer add constraint bmsql_customer_pkey
  primary key (c_w_id, c_d_id, c_id);

create index bmsql_customer_idx1
  on  bmsql_customer (c_w_id, c_d_id, c_last, c_first);

alter table bmsql_oorder add constraint bmsql_oorder_pkey
  primary key (o_w_id, o_d_id, o_id);

create unique index bmsql_oorder_idx1
  on  bmsql_oorder (o_w_id, o_d_id, o_carrier_id, o_id);

alter table bmsql_new_order add constraint bmsql_new_order_pkey
  primary key (no_w_id, no_d_id, no_o_id);

alter table bmsql_order_line add constraint bmsql_order_line_pkey
  primary key (ol_w_id, ol_d_id, ol_o_id, ol_number);

alter table bmsql_stock add constraint bmsql_stock_pkey
  primary key (s_w_id, s_i_id);

alter table bmsql_item add constraint bmsql_item_pkey
  primary key (i_id);

性能测试

[root@innodb-cluster01 run]#sh runBenchmark.sh props.ob
10:46:22,654 [main] INFO   jTPCC : Term-00, 
10:46:22,658 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
10:46:22,658 [main] INFO   jTPCC : Term-00,      BenchmarkSQL v5.0
10:46:22,658 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
10:46:22,658 [main] INFO   jTPCC : Term-00,  (c) 2003, Raul Barbosa
10:46:22,658 [main] INFO   jTPCC : Term-00,  (c) 2004-2016, Denis Lussier
10:46:22,661 [main] INFO   jTPCC : Term-00,  (c) 2016, Jan Wieck
10:46:22,661 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
10:46:22,661 [main] INFO   jTPCC : Term-00, 
10:46:22,661 [main] INFO   jTPCC : Term-00, db=oracle
10:46:22,661 [main] INFO   jTPCC : Term-00, driver=com.alipay.oceanbase.obproxy.mysql.jdbc.Driver
10:46:22,661 [main] INFO   jTPCC : Term-00, conn=jdbc:oceanbase://192.168.56.20:2883/tpcc?useUnicode=true&characterEncoding=utf-8
10:46:22,661 [main] INFO   jTPCC : Term-00, user=datax@mq_t1
10:46:22,662 [main] INFO   jTPCC : Term-00, 
10:46:22,662 [main] INFO   jTPCC : Term-00, warehouses=2
10:46:22,662 [main] INFO   jTPCC : Term-00, terminals=5
10:46:22,665 [main] INFO   jTPCC : Term-00, runMins=3
10:46:22,665 [main] INFO   jTPCC : Term-00, limitTxnsPerMin=0
10:46:22,665 [main] INFO   jTPCC : Term-00, terminalWarehouseFixed=true
10:46:22,665 [main] INFO   jTPCC : Term-00, 
10:46:22,665 [main] INFO   jTPCC : Term-00, newOrderWeight=45
10:46:22,665 [main] INFO   jTPCC : Term-00, paymentWeight=43
10:46:22,666 [main] INFO   jTPCC : Term-00, orderStatusWeight=4
10:46:22,666 [main] INFO   jTPCC : Term-00, deliveryWeight=4
10:46:22,666 [main] INFO   jTPCC : Term-00, stockLevelWeight=4
10:46:22,666 [main] INFO   jTPCC : Term-00, 
10:46:22,666 [main] INFO   jTPCC : Term-00, resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
10:46:22,666 [main] INFO   jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
10:46:22,666 [main] INFO   jTPCC : Term-00, 
10:46:22,679 [main] INFO   jTPCC : Term-00, copied props.ob to my_result_2024-03-10_104622/run.properties
10:46:22,679 [main] INFO   jTPCC : Term-00, created my_result_2024-03-10_104622/data/runInfo.csv for runID 7
10:46:22,680 [main] INFO   jTPCC : Term-00, writing per transaction results to my_result_2024-03-10_104622/data/result.csv
10:46:22,681 [main] INFO   jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
10:46:22,681 [main] INFO   jTPCC : Term-00, osCollectorInterval=1
10:46:22,681 [main] INFO   jTPCC : Term-00, osCollectorSSHAddr=null
10:46:22,681 [main] INFO   jTPCC : Term-00, osCollectorDevices=null
10:46:22,754 [main] INFO   jTPCC : Term-00,
10:46:23,088 [main] INFO   jTPCC : Term-00, C value for C_LAST during load: 174
10:46:23,088 [main] INFO   jTPCC : Term-00, C value for C_LAST this run:    246
10:46:23,088 [main] INFO   jTPCC : Term-00, 
Term-00, Running Average tpmTOTAL: 880.90    Current tpmTOTAL: 888    Memory Usage: 48MB / 236MB           
Term-00, Running Average tpmTOTAL: 1330.69    Current tpmTOTAL: 12456    Memory Usage: 36MB / 228MB          
Term-00, Running Average tpmTOTAL: 1069.82    Current tpmTOTAL: 20892    Memory Usage: 7MB / 219MB           
Term-00, Running Average tpmTOTAL: 830.32    Current tpmTOTAL: 20472    Memory Usage: 9MB / 219MB          
10:50:10,596 [Thread-5] INFO   jTPCC : Term-00, 
10:50:10,597 [Thread-5] INFO   jTPCC : Term-00, 
10:50:10,597 [Thread-5] INFO   jTPCC : Term-00, Measured tpmC (NewOrders) = 380.2
10:50:10,597 [Thread-5] INFO   jTPCC : Term-00, Measured tpmTOTAL = 830.32
10:50:10,597 [Thread-5] INFO   jTPCC : Term-00, Session Start     = 2024-03-10 10:46:23
10:50:10,597 [Thread-5] INFO   jTPCC : Term-00, Session End       = 2024-03-10 10:50:10
10:50:10,597 [Thread-5] INFO   jTPCC : Term-00, Transaction Count = 3146

tpmC用来衡量IOPS.
Transaction用来衡量TPS.

分析top sql

查询top sql

SELECT sql_id, count(*),  round(avg(elapsed_time)) avg_elapsed_time, 
	  round(avg(execute_time)) avg_exec_time
	FROM GV$OB_SQL_AUDIT s
	WHERE DB_NAME='tpcc' 
	GROUP BY sql_id
	order by avg_elapsed_time desc limit 10;
+----------------------------------+----------+------------------+---------------+
| sql_id                           | count(*) | avg_elapsed_time | avg_exec_time |
+----------------------------------+----------+------------------+---------------+
| B447DE16B3F42D2409B2A2BE50328E63 |        1 |         76518226 |        247658 |
| F59A700FA168324279B0DBC25E19760F |        1 |         76359957 |      64612631 |
| AB92F1B97A8D4DADFD477BB52C65A00B |        2 |         38008119 |       5118976 |
| AE32C84F890055A535A28B262C649D41 |        3 |         25339948 |       3428539 |
| F0EFFFCD85E71C241661E66EEA047C58 |       10 |          7604399 |       1026657 |
| 482BA7822AE7BE644CEBEB55213E7284 |        9 |             3071 |          3007 |
| AD9112FD1D4FF113292E5FE777B22F3C |        9 |             1693 |          1420 |
| 8D6E84735C0B8FB1823D199E2CA141C8 |        9 |             1586 |          1424 |
| EC66B09D06D688727D0F999BFCFF5348 |        9 |              816 |           115 |
| F95CD7A05C7064A028D76E0088B147F7 |        9 |              561 |           199 |
+----------------------------------+----------+------------------+---------------+

查询对应的前三个sql

obclient [oceanbase]> select sql_id,QUERY_SQL from GV$OB_SQL_AUDIT where sql_id in('B447DE16B3F42D2409B2A2BE50328E63','F59A700FA168324279B0DBC25E19760F','AB92F1B97A8D4DADFD477BB52C65A00B')\G

*************************** 1. row ***************************
   sql_id: AB92F1B97A8D4DADFD477BB52C65A00B
QUERY_SQL: SELECT c_id     FROM bmsql_customer     WHERE c_w_id = 2 AND c_d_id = 9 AND c_last = 'ATIONOUGHTPRI'     ORDER BY c_first
*************************** 2. row ***************************
   sql_id: F59A700FA168324279B0DBC25E19760F
QUERY_SQL: SELECT count(*) AS low_stock FROM (    SELECT s_w_id, s_i_id, s_quantity         FROM bmsql_stock         WHERE s_w_id = 1 AND s_quantity < 12 AND s_i_id IN (            SELECT ol_i_id                 FROM bmsql_district                 JOIN bmsql_order_line ON ol_w_id = d_w_id                  AND ol_d_id = d_id                  AND ol_o_id >= d_next_o_id - 20                  AND ol_o_id < d_next_o_id                 WHERE d_w_id = 1 AND d_id = 9         )     )
*************************** 3. row ***************************
   sql_id: B447DE16B3F42D2409B2A2BE50328E63
QUERY_SQL: UPDATE bmsql_warehouse     SET w_ytd = w_ytd + 4691.27     WHERE w_id = 2
*************************** 4. row ***************************
   sql_id: AB92F1B97A8D4DADFD477BB52C65A00B
QUERY_SQL: SELECT c_id     FROM bmsql_customer     WHERE c_w_id = 1 AND c_d_id = 1 AND c_last = 'PRESPRESANTI'     ORDER BY c_first
4 rows in set (0.009 sec)

使用explain查看sql的执行计划


obclient [oceanbase]> select sql_id,QUERY_SQL from GV$OB_SQL_AUDIT where sql_id in('B447DE16B3F42D2409B2A2BE50328E63','F59A700FA168324279B0DBC25E19760F','AB92F1B97A8D4DADFD477BB52C65A00B')\G

*************************** 1. row ***************************
   sql_id: AB92F1B97A8D4DADFD477BB52C65A00B
QUERY_SQL: SELECT c_id     FROM bmsql_customer     WHERE c_w_id = 2 AND c_d_id = 9 AND c_last = 'ATIONOUGHTPRI'     ORDER BY c_first
*************************** 2. row ***************************
   sql_id: F59A700FA168324279B0DBC25E19760F
QUERY_SQL: SELECT count(*) AS low_stock FROM (    SELECT s_w_id, s_i_id, s_quantity         FROM bmsql_stock         WHERE s_w_id = 1 AND s_quantity < 12 AND s_i_id IN (            SELECT ol_i_id                 FROM bmsql_district                 JOIN bmsql_order_line ON ol_w_id = d_w_id                  AND ol_d_id = d_id                  AND ol_o_id >= d_next_o_id - 20                  AND ol_o_id < d_next_o_id                 WHERE d_w_id = 1 AND d_id = 9         )     )
*************************** 3. row ***************************
   sql_id: B447DE16B3F42D2409B2A2BE50328E63
QUERY_SQL: UPDATE bmsql_warehouse     SET w_ytd = w_ytd + 4691.27     WHERE w_id = 2
*************************** 4. row ***************************
   sql_id: AB92F1B97A8D4DADFD477BB52C65A00B
QUERY_SQL: SELECT c_id     FROM bmsql_customer     WHERE c_w_id = 1 AND c_d_id = 1 AND c_last = 'PRESPRESANTI'     ORDER BY c_first
4 rows in set (0.009 sec)


obclient [tpcc]> explain SELECT c_id     FROM bmsql_customer     WHERE c_w_id = 2 AND c_d_id = 9 AND c_last = 'ATIONOUGHTPRI'     ORDER BY c_first;
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Query Plan                                                                                                                                                            |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ===============================================================================                                                                                       |
| |ID|OPERATOR        |NAME                               |EST.ROWS|EST.TIME(us)|                                                                                       |
| -------------------------------------------------------------------------------                                                                                       |
| |0 |TABLE RANGE SCAN|bmsql_customer(bmsql_customer_idx1)|12      |5           |                                                                                       |
| ===============================================================================                                                                                       |
| Outputs & filters:                                                                                                                                                    |
| -------------------------------------                                                                                                                                 |
|   0 - output([bmsql_customer.c_id]), filter(nil), rowset=16                                                                                                           |
|       access([bmsql_customer.c_id]), partitions(p0)                                                                                                                   |
|       is_index_back=false, is_global_index=false,                                                                                                                     |
|       range_key([bmsql_customer.c_w_id], [bmsql_customer.c_d_id], [bmsql_customer.c_last], [bmsql_customer.c_first], [bmsql_customer.c_id]), range(2,9,ATIONOUGHTPRI, |
|       MIN,MIN ; 2,9,ATIONOUGHTPRI,MAX,MAX),                                                                                                                           |
|       range_cond([bmsql_customer.c_w_id = 2], [bmsql_customer.c_d_id = 9], [bmsql_customer.c_last = 'ATIONOUGHTPRI'])                                                 |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
13 rows in set (0.006 sec)



obclient [tpcc]> explain SELECT count(*) AS low_stock FROM (    SELECT s_w_id, s_i_id, s_quantity         FROM bmsql_stock         WHERE s_w_id = 1 AND s_quantity < 12 AND s_i_id IN (            SELECT ol_i_id                 FROM bmsql_district                 JOIN bmsql_order_line ON ol_w_id = d_w_id                  AND ol_d_id = d_id                  AND ol_o_id >= d_next_o_id - 20                  AND ol_o_id < d_next_o_id                 WHERE d_w_id = 1 AND d_id = 9         )     )
    -> 
    -> ;
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Query Plan                                                                                                                                                            |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ======================================================================                                                                                                |
| |ID|OPERATOR                  |NAME            |EST.ROWS|EST.TIME(us)|                                                                                                |
| ----------------------------------------------------------------------                                                                                                |
| |0 |SCALAR GROUP BY           |                |1       |42          |                                                                                                |
| |1 |└─NESTED-LOOP JOIN        |                |2       |42          |                                                                                                |
| |2 |  ├─SUBPLAN SCAN          |VIEW2           |2       |11          |                                                                                                |
| |3 |  │ └─HASH DISTINCT       |                |2       |11          |                                                                                                |
| |4 |  │   └─NESTED-LOOP JOIN  |                |2       |11          |                                                                                                |
| |5 |  │     ├─TABLE RANGE SCAN|bmsql_order_line|30      |7           |                                                                                                |
| |6 |  │     └─MATERIAL        |                |1       |3           |                                                                                                |
| |7 |  │       └─TABLE GET     |bmsql_district  |1       |3           |                                                                                                |
| |8 |  └─DISTRIBUTED TABLE GET |bmsql_stock     |1       |21          |                                                                                                |
| ======================================================================                                                                                                |
| Outputs & filters:                                                                                                                                                    |
| -------------------------------------                                                                                                                                 |
|   0 - output([T_FUN_COUNT(*)]), filter(nil), rowset=256                                                                                                               |
|       group(nil), agg_func([T_FUN_COUNT(*)])                                                                                                                          |
|   1 - output(nil), filter(nil), rowset=256                                                                                                                            |
|       conds(nil), nl_params_([VIEW2.VIEW1.ol_i_id(:3)]), use_batch=false                                                                                              |
|   2 - output([VIEW2.VIEW1.ol_i_id]), filter(nil), rowset=256                                                                                                          |
|       access([VIEW2.VIEW1.ol_i_id])                                                                                                                                   |
|   3 - output([bmsql_order_line.ol_i_id]), filter(nil), rowset=256                                                                                                     |
|       distinct([bmsql_order_line.ol_i_id])                                                                                                                            |
|   4 - output([bmsql_order_line.ol_i_id]), filter(nil), rowset=256                                                                                                     |
|       conds([bmsql_order_line.ol_o_id < bmsql_district.d_next_o_id], [bmsql_order_line.ol_o_id >= bmsql_district.d_next_o_id - 20]), nl_params_(nil), use_batch=false |
|   5 - output([bmsql_order_line.ol_o_id], [bmsql_order_line.ol_i_id]), filter(nil), rowset=256                                                                         |
|       access([bmsql_order_line.ol_o_id], [bmsql_order_line.ol_i_id]), partitions(p0)                                                                                  |
|       is_index_back=false, is_global_index=false,                                                                                                                     |
|       range_key([bmsql_order_line.ol_w_id], [bmsql_order_line.ol_d_id], [bmsql_order_line.ol_o_id], [bmsql_order_line.ol_number]), range(1,9,MIN,MIN ; 1,             |
|       9,MAX,MAX),                                                                                                                                                     |
|       range_cond([bmsql_order_line.ol_w_id = 1], [bmsql_order_line.ol_d_id = 9])                                                                                      |
|   6 - output([bmsql_district.d_next_o_id], [bmsql_district.d_next_o_id - 20]), filter(nil), rowset=256                                                                |
|   7 - output([bmsql_district.d_next_o_id], [bmsql_district.d_next_o_id - 20]), filter([bmsql_district.d_next_o_id > bmsql_district.d_next_o_id - 20]), rowset=256     |
|       access([bmsql_district.d_next_o_id]), partitions(p0)                                                                                                            |
|       is_index_back=false, is_global_index=false, filter_before_indexback[false],                                                                                     |
|       range_key([bmsql_district.d_w_id], [bmsql_district.d_id]), range[1,9 ; 1,9],                                                                                    |
|       range_cond([bmsql_district.d_w_id = 1], [bmsql_district.d_id = 9])                                                                                              |
|   8 - output(nil), filter([bmsql_stock.s_quantity < 12]), rowset=256                                                                                                  |
|       access([bmsql_stock.s_quantity]), partitions(p0)                                                                                                                |
|       is_index_back=false, is_global_index=false, filter_before_indexback[false],                                                                                     |
|       range_key([bmsql_stock.s_w_id], [bmsql_stock.s_i_id]), range(MIN ; MAX),                                                                                        |
|       range_cond([bmsql_stock.s_w_id = 1], [bmsql_stock.s_i_id = :3])                                                                                                 |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
42 rows in set (0.061 sec)



obclient [tpcc]> explain SELECT c_id     FROM bmsql_customer     WHERE c_w_id = 1 AND c_d_id = 1 AND c_last = 'PRESPRESANTI'     ORDER BY c_first;
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Query Plan                                                                                                                                                           |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ===============================================================================                                                                                      |
| |ID|OPERATOR        |NAME                               |EST.ROWS|EST.TIME(us)|                                                                                      |
| -------------------------------------------------------------------------------                                                                                      |
| |0 |TABLE RANGE SCAN|bmsql_customer(bmsql_customer_idx1)|1       |4           |                                                                                      |
| ===============================================================================                                                                                      |
| Outputs & filters:                                                                                                                                                   |
| -------------------------------------                                                                                                                                |
|   0 - output([bmsql_customer.c_id]), filter(nil), rowset=16                                                                                                          |
|       access([bmsql_customer.c_id]), partitions(p0)                                                                                                                  |
|       is_index_back=false, is_global_index=false,                                                                                                                    |
|       range_key([bmsql_customer.c_w_id], [bmsql_customer.c_d_id], [bmsql_customer.c_last], [bmsql_customer.c_first], [bmsql_customer.c_id]), range(1,1,PRESPRESANTI, |
|       MIN,MIN ; 1,1,PRESPRESANTI,MAX,MAX),                                                                                                                           |
|       range_cond([bmsql_customer.c_w_id = 1], [bmsql_customer.c_d_id = 1], [bmsql_customer.c_last = 'PRESPRESANTI'])                                                 |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
13 rows in set (0.007 sec)

标签:INFO,10,00,查看,OceanBase,Term,执行,bmsql,id
From: https://www.cnblogs.com/idealx/p/18063956

相关文章

  • SQLServer中sp_Who、sp_Who2和sp_WhoIsActive介绍和查看监视运行
    SQLServer中sp_Who、sp_Who2和sp_WhoIsActive介绍和查看监视运行使用sp_WhoIsActive监视活动sp_WhoIsActive存储过程可以监视SQLServer中当前正在运行的活动。介绍如果服务器速度变慢时,数据库管理员需要不断检查SQLServer实例上正在运行的操作。系统存储过程“s......
  • datax从mysql迁移数据到OceanBase
    datax部署下载dataxdatax下载地址安装dataxtar-zxvfdatax.tar.gz使用datax使用配置文件{"job":{"setting":{"speed":{"channel":4},"errorLimit":{......
  • mysqldump从mysql迁移数据到OceanBase
    使用mysqldump导出数据/usr/bin/mysqldump--single-transaction-Bemployees-S/data/mysql/mysql.sock-uroot-p>dump.sqlob使用source加载obclient-P2883-h192.168.56.20-uroot@mq_t1-A校验数据使用统计信息两个数据库收集统计信息的命令相同收集统计信息an......
  • Linux/macOS 查看网络接口
    Linux$nmclidevicestatusDEVICETYPESTATECONNECTIONenp0s5ethernetconnectedWiredconnection1docker0bridgeconnected(externally)docker0loloopbackunmanaged......
  • 多节点oceanbase 集群部署
    安装前准备硬件要求CPU最少2核磁盘最少19G文件系统EXT4戓XFS关闭透明大页echonever>/sys/kernel/mm/redhat_transparent_hugepage/enabled确认操作系统版本是否支持[root@innodb-cluster01~]#cat/etc/redhat-releaseRedHatEnterpriseLinuxServerrelease7.9......
  • cnpack支持调试状态查看TDataSet对象
    在Debug状态下,cnpack支持查看TDataSet对象了!具体用法:在Debug状态下运行项目,如下图:把鼠标放到q对象上,q是一个基于TDataSet继承来的TkbmMWClientQuery对象,也就是他是一个TDataSet,这时候会弹出一个窗口,也就是一个hint。注意左上角的放大镜,下移鼠标,让鼠标进入hint区域,点击放大镜......
  • 怎么查看 Ioc 容器包含指定 bean
    问题描述今天工作中遇到了一个场景,通过读取yml配置bean信息,如果容器中包含指定bean则进行下一步处理,否则先创建bean,在进行下一步操作,脑子一下子不动了,不知如何判断容器中是否含有指定bean判断方法类中注入  ApplicationContext 通过bean名称判断就行了 1、写......
  • 编写kickstart脚本,执行时遇到的问题
    KickStart脚本#!/bin/bash#declarevaryum_ins="yum-yinstall"sys_res="systemctlrestart"#1.配置dhcpdhcp_cfg(){#declaredhcp_vardhcp_path="/etc/dhcp"dhcp_conf=$dhcp_path/dhcpd.conf#网段net_seg="......
  • 在Docker中,怎么快速查看本地的镜像和容器?
    在Docker中,查看本地的镜像和容器分别可以通过以下两条命令来快速实现:1.查看本地镜像要查看本地计算机上存储的所有Docker镜像,可以使用dockerimages命令。这个命令会列出所有可用的镜像,包括镜像的存储库名称、标签、镜像ID、创建时间和所占用的空间。dockerimages输出示例:......
  • 在Docker中,容器退出后,通过docker ps命令查看不到,数据会丢失么?
    在Docker中,当一个容器退出(stoppedorexited)后,它将不再处于运行状态,因此,通过dockerps命令默认情况下将无法看到已退出的容器。然而,这并不意味着容器内的数据会丢失。容器退出时,其存储层中的数据通常是保留的,除非你明确地删除了容器。这意味着即便容器停止运行,只要你没有使用d......