Oceanbase使用BenchmarkSQL 进行tpcc测试及执行计划查询

Oceanbase使用BenchmarkSQL 进行tpcc测试及执行计划查询

文章目录

  • Oceanbase使用BenchmarkSQL 进行tpcc测试及执行计划查询
    • 环境介绍
    • 配置BenchmarkSQL
    • 开始BenchmarkSQL测试
    • 查看执行计划
      • 查询top sql
      • 查看执行计划
    • 总结
    • 参考文档

环境介绍

操作系统:redhat7.9

内核版本:3.10.0-1160.el7.x86_64

Ocaenbase集群版本:社区版单副本集群,3.1.0,租户为mysql模式

Benchmarksql要求jdk8版本及以上的java环境

[admin@rac04 ~]$ java -version
openjdk version "1.8.0_262"
OpenJDK Runtime Environment (build 1.8.0_262-b10)
OpenJDK 64-Bit Server VM (build 25.262-b10, mixed mode)

配置BenchmarkSQL

创建ob的tpcc数据库和tpcc用户

create database tpcc;
create user tpcc identified by 'tpcc';
grant all on *.* to tpcc;

修改ob的超时设置

set global ob_query_timeout=36000000000;
set global ob_trx_timeout=36000000000;-- 为了获得top sql,需要将sql审计打开,默认是开启的
show variables like 'ob_enable_sql_audit';
MySQL [tpcc]> show variables like 'ob_enable_sql_audit';
+---------------------+-------+
| Variable_name       | Value |
+---------------------+-------+
| ob_enable_sql_audit | ON    |
+---------------------+-------+

下载BenchmarkSQL

su - admin
wget -O benchmarksql-5.0.zip https://github.com/meiq4096/benchmarksql-5.0/archive/refs/heads/master.zip

配置benchmarksql

unzip benchmarksql-5.0.zip
cd benchmarksql-5.0-master/run
# 编辑props.ob配置文件
cp props.ob props.ob.bak20240312
vi props.obdb=oceanbase
driver=com.alipay.oceanbase.obproxy.mysql.jdbc.Driver
conn=jdbc:oceanbase://127.1:2883/tpcc?useUnicode=true&characterEncoding=utf-8
user=tpcc@yw#obcluster
password=tpcc// 仓库数为2
warehouses=2
// 并发数为5
loadWorkers=5terminals=2
//To run specified transactions per terminal- runMins must equal zero
runTxnsPerTerminal=0
//To run for specified minutes- runTxnsPerTerminal must equal zero
// 运行10分钟
runMins=10
//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

修改创建表的脚本

cd /sql.oceanbase
cp tableCreates.sql tableCreates.sql.bak20240312
# varchar2类型字段,与mysql租户不兼容,修改varchar2为varchar
sed -i 's/varchar2/varchar/g' tableCreates.sql
# 脚本中创建表组的语句有误,表组名称不能使用双引号
sed -i 's/\"tpcc_group\"/tpcc_group/g' tableCreates.sql
# mysql类型的租户不支持sequence,删除创建sequence的语句
sed -i 's/create sequence bmsql_hist_id_seq;//g' tableCreates.sql
cat tableCreates.sql

创建表

[admin@rac04 run]$ pwd 
/software/benchmarksql-5.0-master/run
[admin@rac04 run]$ ./runSQL.sh props.ob sql.oceanbase/tableCreates.sql

校验表

MySQL [tpcc]> show tables;
+------------------+
| Tables_in_tpcc   |
+------------------+
| bmsql_config     |
| bmsql_customer   |
| bmsql_district   |
| bmsql_history    |
| bmsql_item       |
| bmsql_new_order  |
| bmsql_oorder     |
| bmsql_order_line |
| bmsql_stock      |
| bmsql_warehouse  |
+------------------+
10 rows in set (0.004 sec)

加载数据入表

[admin@rac04 run]$ ./runLoader.sh props.ob
Starting BenchmarkSQL LoadDatadriver=com.alipay.oceanbase.obproxy.mysql.jdbc.Driver
conn=jdbc:oceanbase://127.1:2883/tpcc?useUnicode=true&characterEncoding=utf-8
user=tpcc@yw#obcluster
password=***********
warehouses=2
loadWorkers=5
fileLocation (not defined)
csvNullValue (not defined - using default 'NULL')Worker 000: Loading ITEM
Worker 001: Loading Warehouse      1
Worker 002: Loading Warehouse      2
Worker 000: Loading ITEM done
Worker 001: Loading Warehouse      1 done
Worker 002: Loading Warehouse      2 done

创建索引

[admin@rac04 run]$ ./runSQL.sh props.ob sql.oceanbase/indexCreates.sql
# ------------------------------------------------------------
# Loading SQL file sql.oceanbase/indexCreates.sql
# ------------------------------------------------------------
create index bmsql_customer_idx1
on  bmsql_customer (c_w_id, c_d_id, c_last, c_first) local;
create  index bmsql_oorder_idx1
on  bmsql_oorder (o_w_id, o_d_id, o_carrier_id, o_id) local;

开始BenchmarkSQL测试

开始测试之前,手动做一次合并

MySQL [oceanbase]> alter system major freeze;
Query OK, 0 rows affected (0.007 sec)

开始测试

[admin@rac04 run]$ ./runBenchmark.sh props.ob
01:27:24,021 [main] INFO   jTPCC : Term-00, 
01:27:24,028 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
01:27:24,029 [main] INFO   jTPCC : Term-00,      BenchmarkSQL v5.0
01:27:24,029 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
01:27:24,029 [main] INFO   jTPCC : Term-00,  (c) 2003, Raul Barbosa
01:27:24,029 [main] INFO   jTPCC : Term-00,  (c) 2004-2016, Denis Lussier
01:27:24,031 [main] INFO   jTPCC : Term-00,  (c) 2016, Jan Wieck
01:27:24,031 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
01:27:24,031 [main] INFO   jTPCC : Term-00, 
01:27:24,031 [main] INFO   jTPCC : Term-00, db=oracle
01:27:24,032 [main] INFO   jTPCC : Term-00, driver=com.alipay.oceanbase.obproxy.mysql.jdbc.Driver
01:27:24,032 [main] INFO   jTPCC : Term-00, conn=jdbc:oceanbase://127.1:2883/tpcc?useUnicode=true&characterEncoding=utf-8
01:27:24,032 [main] INFO   jTPCC : Term-00, user=tpcc@yw#obcluster
01:27:24,032 [main] INFO   jTPCC : Term-00, 
01:27:24,032 [main] INFO   jTPCC : Term-00, warehouses=2
01:27:24,032 [main] INFO   jTPCC : Term-00, terminals=2
01:27:24,033 [main] INFO   jTPCC : Term-00, runMins=10
01:27:24,033 [main] INFO   jTPCC : Term-00, limitTxnsPerMin=0
01:27:24,034 [main] INFO   jTPCC : Term-00, terminalWarehouseFixed=true
01:27:24,034 [main] INFO   jTPCC : Term-00, 
01:27:24,034 [main] INFO   jTPCC : Term-00, newOrderWeight=45
01:27:24,034 [main] INFO   jTPCC : Term-00, paymentWeight=43
01:27:24,034 [main] INFO   jTPCC : Term-00, orderStatusWeight=4
01:27:24,034 [main] INFO   jTPCC : Term-00, deliveryWeight=4
01:27:24,034 [main] INFO   jTPCC : Term-00, stockLevelWeight=4
01:27:24,034 [main] INFO   jTPCC : Term-00, 
01:27:24,034 [main] INFO   jTPCC : Term-00, resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
01:27:24,034 [main] INFO   jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
01:27:24,034 [main] INFO   jTPCC : Term-00, 
01:27:24,045 [main] INFO   jTPCC : Term-00, copied props.ob to my_result_2024-03-12_012724/run.properties
01:27:24,045 [main] INFO   jTPCC : Term-00, created my_result_2024-03-12_012724/data/runInfo.csv for runID 6
01:27:24,046 [main] INFO   jTPCC : Term-00, writing per transaction results to my_result_2024-03-12_012724/data/result.csv
01:27:24,047 [main] INFO   jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
01:27:24,047 [main] INFO   jTPCC : Term-00, osCollectorInterval=1
01:27:24,047 [main] INFO   jTPCC : Term-00, osCollectorSSHAddr=null
01:27:24,047 [main] INFO   jTPCC : Term-00, osCollectorDevices=null
01:27:24,134 [main] INFO   jTPCC : Term-00,
01:27:24,420 [main] INFO   jTPCC : Term-00, C value for C_LAST during load: 19
01:27:24,421 [main] INFO   jTPCC : Term-00, C value for C_LAST this run:    122
01:27:24,421 [main] INFO   jTPCC : Term-00, 
……
……Term-00, Running Average tpmTOTAL: 1434.69    Current tpmTOTAL: 95832    Memory Usage: 18MB / 196MB          
01:37:24,679 [Thread-1] INFO   jTPCC : Term-00, 
01:37:24,679 [Thread-1] INFO   jTPCC : Term-00, 
01:37:24,679 [Thread-1] INFO   jTPCC : Term-00, Measured tpmC (NewOrders) = 637.1
01:37:24,680 [Thread-1] INFO   jTPCC : Term-00, Measured tpmTOTAL = 1434.47
01:37:24,680 [Thread-1] INFO   jTPCC : Term-00, Session Start     = 2024-03-12 01:27:24
01:37:24,680 [Thread-1] INFO   jTPCC : Term-00, Session End       = 2024-03-12 01:37:24
01:37:24,680 [Thread-1] INFO   jTPCC : Term-00, Transaction Count = 14348

查看执行计划

查询top sql

查找性能测试期间,执行时间top5 sql

这里着重解释一下request_time的条件,以性能测试结束时间为基点,查找请求时间位于2024-03-12 01:37:24及之前10分钟内的sql。需要注意的是将request_time的值是距离 1970-01-01 00:00:00.000000 的微秒数,因此需要调用time_to_usec函数转换时间。

SELECT/*+ PARALLEL(4)*/ sql_id,query_sql,plan_id, elapsed_time , trace_id    FROM oceanbase.gv$sql_audit     WHERE   tenant_id = 1001 and IS_EXECUTOR_RPC = 0 and request_time > (time_to_usec(date_format('2024-03-12 01:37:24','%Y-%m-%d %T')) - 10000000*6*10) AND request_time < time_to_usec(date_format('2024-03-12 01:37:24','%Y-%m-%d %T')) ORDER BY elapsed_time DESC LIMIT 10;MySQL [tpcc]> SELECT/*+ PARALLEL(4)*/ sql_id,query_sql,plan_id, elapsed_time , trace_id    ->          FROM oceanbase.gv$sql_audit     ->          WHERE   tenant_id = 1001 ->          and IS_EXECUTOR_RPC = 0 ->          and request_time > (time_to_usec(date_format('2024-03-12 01:37:24','%Y-%m-%d %T')) - 10000000*6*10) ->          AND request_time < time_to_usec(date_format('2024-03-12 01:37:24','%Y-%m-%d %T')) ->          ORDER BY elapsed_time DESC LIMIT 10\G
*************************** 1. row ***************************sql_id: FFFCA4D67EA0A788813031B8BBC3B329query_sql: SELECT count(*) AS low_stock FROM (    SELECT s_w_id, s_i_id, s_quantity         FROM bmsql_stock         WHERE s_w_id = 2 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 = 2 AND d_id = 5         )     )plan_id: 130
elapsed_time: 19786trace_id: YB420B0B0B0E-00061364401FFA67
*************************** 2. row ***************************sql_id: FFFCA4D67EA0A788813031B8BBC3B329query_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 < 13 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 = 10         )     )plan_id: 130
elapsed_time: 18749trace_id: YB420B0B0B0E-000613643FFFF583
*************************** 3. row ***************************sql_id: FFFCA4D67EA0A788813031B8BBC3B329query_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 < 16 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 = 10         )     )plan_id: 130
elapsed_time: 18074trace_id: YB420B0B0B0E-00061364402FC346
*************************** 4. row ***************************sql_id: FFFCA4D67EA0A788813031B8BBC3B329query_sql: SELECT s_quantity, s_data,        s_dist_01, s_dist_02, s_dist_03, s_dist_04,        s_dist_05, s_dist_06, s_dist_07, s_dist_08,        s_dist_09, s_dist_10     FROM bmsql_stock     WHERE s_w_id = 2 AND s_i_id = 68621     FOR UPDATEplan_id: 116
elapsed_time: 17701trace_id: YB420B0B0B0E-00061364404FC6E5
*************************** 5. row ***************************sql_id: FFFCA4D67EA0A788813031B8BBC3B329query_sql: SELECT s_quantity, s_data,        s_dist_01, s_dist_02, s_dist_03, s_dist_04,        s_dist_05, s_dist_06, s_dist_07, s_dist_08,        s_dist_09, s_dist_10     FROM bmsql_stock     WHERE s_w_id = 2 AND s_i_id = 59773     FOR UPDATEplan_id: 116
elapsed_time: 16933trace_id: YB420B0B0B0E-00061364400FF6EF
*************************** 6. row ***************************sql_id:                                 query_sql: SELECT s_quantity, s_data,        s_dist_01, s_dist_02, s_dist_03, s_dist_04,        s_dist_05, s_dist_06, s_dist_07, s_dist_08,        s_dist_09, s_dist_10     FROM bmsql_stock     WHERE s_w_id = 2 AND s_i_id = 45283     FOR UPDATEplan_id: 116
elapsed_time: 16895trace_id: YB420B0B0B0E-00061364401FFAE2
*************************** 7. row ***************************sql_id: FFFCA4D67EA0A788813031B8BBC3B329query_sql: SELECT s_quantity, s_data,        s_dist_01, s_dist_02, s_dist_03, s_dist_04,        s_dist_05, s_dist_06, s_dist_07, s_dist_08,        s_dist_09, s_dist_10     FROM bmsql_stock     WHERE s_w_id = 2 AND s_i_id = 83525     FOR UPDATEplan_id: 116
elapsed_time: 15588trace_id: YB420B0B0B0E-00061364401FF927
*************************** 8. row ***************************sql_id: FFFCA4D67EA0A788813031B8BBC3B329query_sql: SELECT i_price, i_name, i_data     FROM bmsql_item     WHERE i_id = 39891plan_id: 113
elapsed_time: 15104trace_id: YB420B0B0B0E-00061364403FC65B
*************************** 9. row ***************************sql_id: FFFCA4D67EA0A788813031B8BBC3B329query_sql: SELECT c_first, c_middle, c_last, c_street_1, c_street_2,        c_city, c_state, c_zip, c_phone, c_since, c_credit,        c_credit_lim, c_discount, c_balance     FROM bmsql_customer     WHERE c_w_id = 2 AND c_d_id = 4 AND c_id = 193     FOR UPDATEplan_id: 118
elapsed_time: 15015trace_id: YB420B0B0B0E-00061364401FF7C1
*************************** 10. row ***************************sql_id: FFFCA4D67EA0A788813031B8BBC3B329query_sql: SELECT i_price, i_name, i_data     FROM bmsql_item     WHERE i_id = 4421plan_id: 113
elapsed_time: 14234trace_id: YB420B0B0B0E-00061364400FFABC
10 rows in set (0.026 sec)

查看执行计划

首先查看top10的解析执行计划,这里挑3条,plan_id分别为130,116,113。

MySQL [tpcc]> explain SELECT count(*) AS low_stock FROM (    SELECT s_w_id, s_i_id, s_quantity   FROM bmsql_stock    WHERE s_w_id = 2 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 = 2 AND d_id = 5));
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Query Plan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ==========================================================
|ID|OPERATOR            |NAME            |EST. ROWS|COST |
----------------------------------------------------------
|0 |SCALAR GROUP BY     |                |1        |46984|
|1 | NESTED-LOOP JOIN   |                |1221     |46750|
|2 |  SUBPLAN SCAN      |VIEW2           |1215     |2677 |
|3 |   HASH DISTINCT    |                |1215     |2509 |
|4 |    NESTED-LOOP JOIN|                |1219     |1239 |
|5 |     TABLE GET      |bmsql_district  |1        |53   |
|6 |     TABLE SCAN     |bmsql_order_line|3656     |1194 |
|7 |  TABLE GET         |bmsql_stock     |1        |37   |
==========================================================Outputs & filters: 
-------------------------------------0 - output([T_FUN_COUNT(*)]), filter(nil), group(nil), agg_func([T_FUN_COUNT(*)])1 - output([1]), filter(nil), conds(nil), nl_params_([VIEW2.VIEW1.ol_i_id])2 - output([VIEW2.VIEW1.ol_i_id]), filter(nil), access([VIEW2.VIEW1.ol_i_id])3 - output([bmsql_order_line.ol_i_id]), filter(nil), distinct([bmsql_order_line.ol_i_id])4 - output([bmsql_order_line.ol_i_id]), filter(nil), conds(nil), nl_params_([bmsql_district.d_next_o_id - 20], [bmsql_district.d_next_o_id])5 - output([bmsql_district.d_next_o_id]), filter([bmsql_district.d_next_o_id > bmsql_district.d_next_o_id - 20]), access([bmsql_district.d_next_o_id]), partitions(p0)6 - output([bmsql_order_line.ol_i_id]), filter(nil), access([bmsql_order_line.ol_i_id]), partitions(p0)7 - output([1]), filter([bmsql_stock.s_quantity < 12]), access([bmsql_stock.s_quantity]), partitions(p0)|
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.010 sec)
MySQL [tpcc]> explain SELECT s_quantity, s_data,        s_dist_01, s_dist_02, s_dist_03, s_dist_04,        s_dist_05, s_dist_06, s_dist_07, s_dist_08,        s_dist_09, s_dist_10     FROM bmsql_stock     WHERE s_w_id = 2 AND s_i_id = 59773     FOR UPDATE;
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Query Plan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| =========================================
|ID|OPERATOR |NAME       |EST. ROWS|COST|
-----------------------------------------
|0 |TABLE GET|bmsql_stock|1        |54  |
=========================================Outputs & filters: 
-------------------------------------0 - output([bmsql_stock.s_quantity], [bmsql_stock.s_data], [bmsql_stock.s_dist_01], [bmsql_stock.s_dist_02], [bmsql_stock.s_dist_03], [bmsql_stock.s_dist_04], [bmsql_stock.s_dist_05], [bmsql_stock.s_dist_06], [bmsql_stock.s_dist_07], [bmsql_stock.s_dist_08], [bmsql_stock.s_dist_09], [bmsql_stock.s_dist_10]), filter(nil), access([bmsql_stock.s_w_id], [bmsql_stock.s_i_id], [bmsql_stock.s_quantity], [bmsql_stock.s_data], [bmsql_stock.s_dist_01], [bmsql_stock.s_dist_02], [bmsql_stock.s_dist_03], [bmsql_stock.s_dist_04], [bmsql_stock.s_dist_05], [bmsql_stock.s_dist_06], [bmsql_stock.s_dist_07], [bmsql_stock.s_dist_08], [bmsql_stock.s_dist_09], [bmsql_stock.s_dist_10]), partitions(p0)|
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.005 sec)
MySQL [tpcc]> explain SELECT i_price, i_name, i_data     FROM bmsql_item     WHERE i_id = 39891;
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Query Plan                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ========================================
|ID|OPERATOR |NAME      |EST. ROWS|COST|
----------------------------------------
|0 |TABLE GET|bmsql_item|1        |53  |
========================================Outputs & filters: 
-------------------------------------0 - output([bmsql_item.i_price], [bmsql_item.i_name], [bmsql_item.i_data]), filter(nil), access([bmsql_item.i_price], [bmsql_item.i_name], [bmsql_item.i_data]), partitions(p0)|
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.004 sec)

查看top3的实际执行计划。由于执行计划已经刷出缓存,因此性能测试期间top10sql的实际执行计划没法看到。这里手动执行相关sql,再查询其执行计划。

MySQL [tpcc]> SELECT count(*) AS low_stock FROM (    SELECT s_w_id, s_i_id, s_quantity   FROM bmsql_stock    WHERE s_w_id = 2 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 = 2 AND d_id = 5));
-- 查询刚刚执行的sql的plan_id
MySQL [tpcc1]> SELECT/*+ PARALLEL(4)*/ tenant_id,svr_ip,svr_port,sql_id,query_sql,plan_id, elapsed_time , trace_id  ->          FROM oceanbase.gv$sql_audit     ->          WHERE   tenant_id = 1001 and user_name='tpcc'->          and IS_EXECUTOR_RPC = 0 ->          and request_time > (time_to_usec(now()) - 10000000*6*10) ->          AND request_time < time_to_usec(now()) ->          ORDER BY elapsed_time DESC LIMIT 10\G
*************************** 1. row ***************************tenant_id: 1001svr_ip: 11.11.11.14svr_port: 2882sql_id: 9EDED4BC6305E5F4FCF86A6366BDD638query_sql: SELECT count(*) AS low_stock FROM (    SELECT s_w_id, s_i_id, s_quantity   FROM bmsql_stock    WHERE s_w_id = 2 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 = 2 AND d_id = 5))plan_id: 273
elapsed_time: 21739trace_id: YB420B0B0B0E-00061364403FC7B5-- 根据sql_id查看实际执行计划
MySQL [tpcc1]> select * from oceanbase.gv$plan_cache_plan_explain where tenant_id=1001 and ip='11.11.11.14' and port='2882' and plan_id =273;
+-----------+-------------+------+---------+------------+--------------+--------------------------+------------------+------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| TENANT_ID | IP          | PORT | PLAN_ID | PLAN_DEPTH | PLAN_LINE_ID | OPERATOR                 | NAME             | ROWS | COST  | PROPERTY                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
+-----------+-------------+------+---------+------------+--------------+--------------------------+------------------+------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|      1001 | 11.11.11.14 | 2882 |     273 |          0 |            0 | PHY_SCALAR_AGGREGATE     | NULL             |    1 | 46983 | NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|      1001 | 11.11.11.14 | 2882 |     273 |          1 |            1 |  PHY_NESTED_LOOP_JOIN    | NULL             | 1221 | 46749 | NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|      1001 | 11.11.11.14 | 2882 |     273 |          2 |            2 |   PHY_SUBPLAN_SCAN       | NULL             | 1215 |  2676 | NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|      1001 | 11.11.11.14 | 2882 |     273 |          3 |            3 |    PHY_HASH_DISTINCT     | NULL             | 1215 |  2508 | NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|      1001 | 11.11.11.14 | 2882 |     273 |          4 |            4 |     PHY_NESTED_LOOP_JOIN | NULL             | 1219 |  1238 | NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|      1001 | 11.11.11.14 | 2882 |     273 |          5 |            5 |      PHY_TABLE_SCAN      | bmsql_district   |    1 |    52 | table_rows:20, physical_range_rows:1, logical_range_rows:1, index_back_rows:0, output_rows:0, est_method:local_storage                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|      1001 | 11.11.11.14 | 2882 |     273 |          5 |            6 |      PHY_TABLE_SCAN      | bmsql_order_line | 3656 |  1193 | table_rows:663235, physical_range_rows:3655, logical_range_rows:3655, index_back_rows:0, output_rows:3655, est_method:local_storage, avaiable_index_name[bmsql_order_line], estimation info[table_id:1100611139453804, (table_type:1, version:0-1710180010831939-1710180010831939, logical_rc:32898, physical_rc:32898), (table_type:7, version:1710180000826357-1710180010831939-1710180031319922, logical_rc:0, physical_rc:0), (table_type:5, version:1710180000826357-1710180010831939-1710180031319922, logical_rc:0, physical_rc:0), (table_type:0, version:1710180031319922-1710180031319922-9223372036854775807, logical_rc:0, physical_rc:0)] |
|      1001 | 11.11.11.14 | 2882 |     273 |          2 |            7 |   PHY_TABLE_SCAN         | bmsql_stock      |    1 |    36 | table_rows:200000, physical_range_rows:1, logical_range_rows:1, index_back_rows:0, output_rows:0, est_method:local_storage, estimation info[table_id:1100611139453806, (table_type:1, version:0-1710180010831939-1710180010831939, logical_rc:200000, physical_rc:200000), (table_type:7, version:1710180000827822-1710180010831939-1710180031377423, logical_rc:0, physical_rc:0), (table_type:5, version:1710180000827822-1710180010831939-1710180031377423, logical_rc:0, physical_rc:0), (table_type:0, version:1710180031377423-1710180031377423-9223372036854775807, logical_rc:0, physical_rc:0)]                                               |
+-----------+-------------+------+---------+------------+--------------+--------------------------+------------------+------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8 rows in set (0.012 sec)

另外两个sql也是同样的方法

MySQL [tpcc]> SELECT s_quantity, s_data,        s_dist_01, s_dist_02, s_dist_03, s_dist_04,        s_dist_05, s_dist_06, s_dist_07, s_dist_08,        s_dist_09, s_dist_10     FROM bmsql_stock     WHERE s_w_id = 2 AND s_i_id = 59773     FOR UPDATE;
+------------+------------------------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+
| s_quantity | s_data                                   | s_dist_01                | s_dist_02                | s_dist_03                | s_dist_04                | s_dist_05                | s_dist_06                | s_dist_07                | s_dist_08                | s_dist_09                | s_dist_10                |
+------------+------------------------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+
|        104 | BpZzCr9yN9SC8clF5llHzwmg5ANR2drV0ZM553QR | mWO9fxl80umm3A23HwjvNySD | mL3z0rJqTApoGIIJjan5bGJd | xqELg15kkS8s6HTtS9hh4sXg | dTdPg5Jxlow6W9rR8rWoZxCH | tdRCLqTvKjzL00278CuyVXnb | DXL4EfkVLKtmppr1izzGfEKU | b3JcaKms9g1AwbXJyfBP8X3f | ECNsuU7KphEUcLmp9csAaWjv | PFSSM2fGrMSrNx7stdhSb5HS | Juk9PMbM4rgf0MbUcNRQJFkr |
+------------+------------------------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+
1 row in set (0.012 sec)MySQL [tpcc1]> SELECT/*+ PARALLEL(4)*/ tenant_id,svr_ip,svr_port,sql_id,query_sql,plan_id, elapsed_time , trace_id  ->          FROM oceanbase.gv$sql_audit     ->          WHERE   tenant_id = 1001 and user_name='tpcc'->          and IS_EXECUTOR_RPC = 0 ->          and request_time > (time_to_usec(now()) - 10000000*6*10) ->          AND request_time < time_to_usec(now()) ->          ORDER BY elapsed_time DESC LIMIT 10\G……
*************************** 2. row ***************************tenant_id: 1001svr_ip: 11.11.11.14svr_port: 2882sql_id: 7229213613983BC5FDA15AD11EC70D01query_sql: SELECT s_quantity, s_data,        s_dist_01, s_dist_02, s_dist_03, s_dist_04,        s_dist_05, s_dist_06, s_dist_07, s_dist_08,        s_dist_09, s_dist_10     FROM bmsql_stock     WHERE s_w_id = 2 AND s_i_id = 59773     FOR UPDATEplan_id: 285
elapsed_time: 11143trace_id: YB420B0B0B0E-00061364401FFB9AMySQL [tpcc1]> select * from oceanbase.gv$plan_cache_plan_explain where tenant_id=1001 and ip='11.11.11.14' and port='2882' and plan_id =285;
+-----------+-------------+------+---------+------------+--------------+----------------+-------------+------+------+----------------------------------------------------------------------------------------------------------------------------+
| TENANT_ID | IP          | PORT | PLAN_ID | PLAN_DEPTH | PLAN_LINE_ID | OPERATOR       | NAME        | ROWS | COST | PROPERTY                                                                                                                   |
+-----------+-------------+------+---------+------------+--------------+----------------+-------------+------+------+----------------------------------------------------------------------------------------------------------------------------+
|      1001 | 11.11.11.14 | 2882 |     285 |          0 |            0 | PHY_TABLE_SCAN | bmsql_stock |    1 |   53 | table_rows:200000, physical_range_rows:1, logical_range_rows:1, index_back_rows:0, output_rows:1, est_method:local_storage |
+-----------+-------------+------+---------+------------+--------------+----------------+-------------+------+------+----------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.008 sec)
MySQL [tpcc]> SELECT i_price, i_name, i_data     FROM bmsql_item     WHERE i_id = 39891;
+---------+------------------------+-----------------------------------------------+
| i_price | i_name                 | i_data                                        |
+---------+------------------------+-----------------------------------------------+
|   69.54 | OMb08X4TPeHtLe428FtyEC | wAUmMP35zjmdWqzAVFPMijvh9fugn6EzuSclVnNIabBy8 |
+---------+------------------------+-----------------------------------------------+
1 row in set (0.003 sec)
MySQL [tpcc1]> SELECT/*+ PARALLEL(4)*/ tenant_id,svr_ip,svr_port,sql_id,query_sql,plan_id, elapsed_time , trace_id  ->          FROM oceanbase.gv$sql_audit     ->          WHERE   tenant_id = 1001 and user_name='tpcc'->          and IS_EXECUTOR_RPC = 0 ->          and request_time > (time_to_usec(now()) - 10000000*6*10) ->          AND request_time < time_to_usec(now()) ->          ORDER BY elapsed_time DESC LIMIT 10\G
……
*************************** 2. row ***************************tenant_id: 1001svr_ip: 11.11.11.14svr_port: 2882sql_id: A460265EC2F0763A15DD27CE9E4E2200query_sql: SELECT i_price, i_name, i_data     FROM bmsql_item     WHERE i_id = 39891plan_id: 286
elapsed_time: 2816trace_id: YB420B0B0B0E-00061364403FC7C2
2 rows in set (0.018 sec)
MySQL [tpcc1]> select * from oceanbase.gv$plan_cache_plan_explain where tenant_id=1001 and ip='11.11.11.14' and port='2882' and plan_id =286;
+-----------+-------------+------+---------+------------+--------------+----------------+------------+------+------+----------------------------------------------------------------------------------------------------------------------------+
| TENANT_ID | IP          | PORT | PLAN_ID | PLAN_DEPTH | PLAN_LINE_ID | OPERATOR       | NAME       | ROWS | COST | PROPERTY                                                                                                                   |
+-----------+-------------+------+---------+------------+--------------+----------------+------------+------+------+----------------------------------------------------------------------------------------------------------------------------+
|      1001 | 11.11.11.14 | 2882 |     286 |          0 |            0 | PHY_TABLE_SCAN | bmsql_item |    1 |   52 | table_rows:100000, physical_range_rows:1, logical_range_rows:1, index_back_rows:0, output_rows:1, est_method:local_storage |
+-----------+-------------+------+---------+------------+--------------+----------------+------------+------+------+----------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.008 sec)

总结

  1. 使用benchmarksql的create_table.sql脚本创建表之前,需要修改一些内容:

    • varchar2–>varchar;
    • 创建tablegroup的语句,表组名不能使用双引号,需要删除双引号;
    • 删除创建sequence的语句。
  2. 查看执行计划的一般步骤

    • (可选)查询oceanbase.gv$sql_audit 视图获取top sql,获取tenant_id,svr_ip,svr_port,sql_id,query_sql,plan_id等关键信息

      --查看10分钟内的耗时topsql
      SELECT/*+ PARALLEL(4)*/ tenant_id,svr_ip,svr_port,sql_id,query_sql,plan_id, elapsed_time , trace_id  FROM oceanbase.gv$sql_audit     WHERE   tenant_id = 1001 and user_name='tpcc'and IS_EXECUTOR_RPC = 0 and request_time > (time_to_usec(now()) - 10000000*6*10) AND request_time < time_to_usec(now()) ORDER BY elapsed_time DESC LIMIT 10;
      
      -- 查看指定时间段内的耗时topsql,这里是2024-03-12 01:37:24至前10分钟
      SELECT/*+ PARALLEL(4)*/ *   FROM oceanbase.gv$sql_audit     WHERE   tenant_id = 1001 and IS_EXECUTOR_RPC = 0 and request_time > (time_to_usec(date_format('2024-03-12 01:37:24','%Y-%m-%d %T')) - 10000000*6*10) AND request_time < time_to_usec(date_format('2024-03-12 01:37:24','%Y-%m-%d %T')) ORDER BY elapsed_time DESC LIMIT 10;
      
    • 查询oceanbase.gv$plan_cache_plan_explain视图获取真实执行计划(缓存被清理就看不到了)

      select*
      fromoceanbase.gv$plan_cache_plan_explain
      wheretenant_id = 1001and ip = '11.11.11.14'and port = '2882'and plan_id = 286;
      
    • 对于解析执行计划,直接使用explain命令即可,比如:

      explain SELECT i_price, i_name, i_data FROM bmsql_item WHERE i_id = 39891;
      

参考文档

OceanBase分布式数据库-海量数据 笔笔算数

GitHub - meiq4096/benchmarksql-5.0: benchmarksql-5.0 for oceanbase

查询某段时间内执行时间排名 TOP N 的请求 -OceanBase 数据库-OceanBase文档中心-分布式数据库使用文档

查询排名 TOP N 的 SQL -OceanBase 数据库-OceanBase文档中心-分布式数据库使用文档

函数 -OceanBase 数据库-OceanBase文档中心-分布式数据库使用文档

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

unity3d Animal Controller的动物组件使用明天继续

控制器介绍 动物脚本负责控制动物的所有运动逻辑.它管理所有的动画师和刚体参数,以及所有的状态和模式,动物可以做。 动物控制器 是一个动画框架控制器,根动或到位,为任何生物或人形。它利用刚体与物理世界的互动和动画师的玩动画。 States States 是不互相重叠的动画。例如…

牛角表情生成器微信小程序版

1.纯前端输出&#xff0c;无需后台&#xff0c;无需域名&#xff0c;速度杠杠快&#xff01; 2.完美支持微信端和抖音端&#xff1b; 3.双端均支持配置开启流量主广告&#xff0c;包括&#xff1a;激励视频广告、插屏广告、banner广告、原生广告、封面广告等&#xff1b; 4.…

Codeforces Round 933 (Div. 3) A~D

比赛链接 : codeforces.com/contest/1941 A . Rudolf and the Ticket 直接暴力即可 ; #include<bits/stdc.h> #define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define endl \n #define lowbit(x) (x&(-x)) #define sz(a) (int)a.size() #define p…

最好用的流程编辑器bpmn-js系列之基本使用

BPMN&#xff08;Business Process Modeling Notation&#xff09;是由业务流程管理倡议组织BPMI&#xff08;The Business Process Management Initiative&#xff09;开发的一套标准的业务流程建模符号规范。其目的是为用户提供一套容易理解的标准符号&#xff0c;这些符号作…

数学建模理论与实践国防科大版

目录 1.数学建模概论 2.生活中的数学建模 2.1.行走步长问题 2.2.雨中行走问题 2.3.抽奖策略 2.4.《非诚勿扰》女生的“最优选择” 3.集体决策模型 3.1.简单多数规则 3.2.Borda数规则 3.3.群体决策模型公理和阿罗定理 1.数学建模概论 1.数学模型的概念 2.数学建模的概…

前端之用html做一个用户登陆界面

用户登陆界面 <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><title>用户注册页面</title></head> <body><form action"https://www.baidu.com" method"post">…

关于Node 中间件教程

在Node.js中&#xff0c;中间件是一种非常重要的概念&#xff0c;用于处理HTTP请求。中间件允许您在请求到达目标路由之前或之后执行某些功能。本教程旨在帮助您理解和使用Node.js中的中间件。 什么是中间件&#xff1f; 中间件是一个函数&#xff0c;可访问请求对象&#xf…

2023年全国职业院校技能大赛信息安全管理与评估

信息安全管理与评估三阶段理论 【注意事项】 1.理论测试前请仔细阅读测试系统使用说明文档&#xff0c;按提供的账号和密码登录测试系统进行测试&#xff0c;账号只限1人登录。 2.该部分答题时长包含在第三阶段比赛时长内&#xff0c;请在临近竞赛结束前提交。 3.参赛团队可…

数据库系统概念(第二周 第一堂)

前言 本文的所有知识点、图片均来自《数据库系统概念》&#xff08;黑宝书&#xff09;、山东大学李晖老师PPT。不可用于商业用途转发。 回顾 上周最后一个知识点说到数据库三级模式结构&#xff0c;在这个结构里面我们设立了模式/内模式映像、内模式/外模式映像&#xff0c;主…

闲聊Swift的枚举关联值

闲聊Swift的枚举关联值 枚举&#xff0c;字面上理解&#xff0c;就是把东西一件件列出来。 在许多计算机语言中&#xff0c;枚举都是一种重要的数据结构。使用枚举可以使代码更简洁&#xff0c;语义性更强&#xff0c;更加健壮。 Swift语言也不例外。但和其他语言相比&#xf…

docker搭建upload-labs

Upload-labs 是一个专门设计用于学习和练习文件上传安全的开源工具。它提供了各种场景的文件上传漏洞&#xff0c;供用户通过实践来学习如何发现和利用这些漏洞&#xff0c;同时也能学习到防御措施。使用 Docker 来搭建 upload-labs 环境是一种快速、简便的方法&#xff0c;它可…

[Django 0-1] Core.Cache模块

Caching 源码分析 Django 的 cache 缓存机制&#xff0c;包含了一些代理设计模式(代理了但没完全代理&#xff0c;多此一举)。 通过实现一个CacheHandler的manager类&#xff0c;来实现多缓存后端的统一管理和调用&#xff0c;避免到处实例使用。 缓存的目的 缓存的目的就是…

大华智慧园区综合管理平台 getNewStaypointDetailQuery SQL注入漏洞复现

0x01 产品简介 “大华智慧园区综合管理平台”是一款综合管理平台,具备园区运营、资源调配和智能服务等功能。平台意在协助优化园区资源分配,满足多元化的管理需求,同时通过提供智能服务,增强使用体验。 0x02 漏洞概述 由于大华智慧园区综合管理平台getNewStaypointDetai…

服务器被大流量攻击怎么办?如何防御攻击?

随着网络的发展&#xff0c;我们所遇到的安全挑战也越来越多。尤其是近年来&#xff0c;网络攻击频发&#xff0c;许多互联网企业深受其扰。为了不影响自身业务的稳定运行&#xff0c;许多企业都在想方设法的寻求解决方案&#xff0c;防止服务器被攻击而影响业务发展。下面我们…

开源模型应用落地-安全合规篇(二)

一、前言 在前面的“业务优化篇系列文章”的学习中,我们学会了如何使用线程池、Redis和向量数据库等工具。现在,我们要加快学习的速度。一方面,我们会继续改进AI服务的性能瓶颈,另一方面,我们还要学习如何进行合规操作。 接下来,我们将学习如何使用腾讯云的内容安全审核来…

内网横向渗透一般攻击技巧

1、通过 nmap、nessus 扫描整个内网 ip 主机漏洞&#xff0c;如如 ms08-067、ms17-010、ms12-020、ms15-035、ms19-0708、永恒之蓝2代、cve-2017-7494&#xff08;samba&#xff09;、cve- 2014-6271(破壳)、php cgi 等相关漏洞。 2、通过 nmap 扫内网 80、8080 端口&#xff…

Spring Boot面试系列-03

1. Spring Boot 中 Actuator 有什么作用? 本质上Actuator通过启用production-ready功能使得SpringBoot应用程序变得更有生命力。这些功能允许对生产环境中的应用程序进行监视和管理。 集成SpringBoot Actuator到项目中非常简单。只需要做的是将spring-boot-starter-actuator…

C#常见的.Net类型(一)

目录 一、处理数字二、处理文本三、模式匹配与正则表达式 一、处理数字 常见的数据类型之一是数字&#xff0c;.NET用于处理数字的最常见类型 示例类型描述int用于表示整数值&#xff0c;没有小数部分byte用于表示8位无符号整数double用于表示双精度浮点数decimal用于表示高精…

云起云落:揭秘云计算基础内功心法

文章目录 云计算基本概念云计算发展历程云计算计算模式云计算商业模式云计算部署模式私有云部署公有云部署混合云部署 云计算虚拟化技术虚拟机模式虚拟化容器模式虚拟化容器VS虚拟机 常见虚拟化工具和技术虚拟化工具“轻量级”虚拟化工具 云计算供应商云计算三要点&#xff08;…

笔记:12.1 使用sqlplus /as sysdba登录报错ORA-01017

说明 使用sqlplus / as sysdba 登录时报错 ORA-01017&#xff1a;invalid username/password&#xff1b;logon denied 此时无任何用户的账号密码&#xff0c;需要对密码进行重置&#xff0c;可参考一下方法。 操作 1&#xff0c;删除原PWD文件&#xff0c;位置在 ORACLE_HOME…