[root@linux-dev ~]# rpm -ivh obclient-1.1.1-20190802211743.el7.alios7.x86_64.rpm
准备中... #################################[100%]正在升级/安装...1:obclient-1.1.1-20190802211743.el7################################# [100%]
[root@linux-dev ~]# obclient -h10.19.1.23 -P2883 -usys@oracle_tenant0_1#obtest -p123456 -c -A sys
obclient:[Warning] Using a password onthe command line interface can be insecure.
Welcometo the OceanBase monitor. Commands end with ; or\g.
Your OceanBase connection idis 1652791Server version:5.6.25 OceanBase 2.2.30 (r20200807074943-8db774b3cae3e41d7b06a2c9c82a2bee97eba0c0) (Built Aug 7 2020 08:06:34)
Copyright (c)2000, 2018, Oracle and/or its affiliates. Allrights reserved.
Oracleis a registered trademark of Oracle Corporation and/orits
affiliates. Other names may be trademarksoftheir respective
owners.
Type'help;' or '\h' for help. Type '\c' to clear the currentinput statement.
obclient> explain select * from ob_t_1 t,ob_t_2 t1 where t.id=t1.id->;
ERROR-00942: table or view 'SYS.OB_T_1' does notexist
obclient> explain select * from t,t1 where t.id=t1.id->;+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Query Plan |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ======================================
|ID|OPERATOR |NAME|EST. ROWS|COST |
--------------------------------------
|0 |HASH JOIN | |99000 |592998|
|1 | TABLE SCAN|T |100000 |68478 |
|2 | TABLE SCAN|T1 |100000 |61860 |
======================================Outputs&filters:-------------------------------------
0 - output([T.ID], [T.NAM], [T1.ID], [T1.NAM]), filter(nil),
equal_conds([T.ID = T1.ID]), other_conds(nil)1 - output([T.ID], [T.NAM]), filter(nil),
access([T.ID], [T.NAM]), partitions(p0)2 - output([T1.ID], [T1.NAM]), filter(nil),
access([T1.ID], [T1.NAM]), partitions(p0)|
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00sec)
obclient> exitBye[root@linux-dev ~]# ob
obclient objcopy objdump[root@linux-dev ~]# obclient -h10.19.1.23 -P2883 -uroot@mysql_teant0_2#obtest -p123456 -c -A oceanbase
obclient:[Warning] Using a password onthe command line interface can be insecure.
Welcometo the OceanBase monitor. Commands end with ; or\g.
Your OceanBase connection idis 1652810Server version:5.6.25/*这基本上就是基于mysql 5.6.25*/ OceanBase 2.2.30 (r20200807074943-8db774b3cae3e41d7b06a2c9c82a2bee97eba0c0) (Built Aug 7 2020 08:06:34)
Copyright (c)2000, 2018, Oracle and/or its affiliates. Allrights reserved.
Oracleis a registered trademark of Oracle Corporation and/orits
affiliates. Other names may be trademarksoftheir respective
owners.
Type'help;' or '\h' for help. Type '\c' to clear the currentinput statement.
obclient> explain select * from ob_t_1 t,ob_t_2 t1 where t.id=t1.id;
ERROR1146 (42S02): Table 'oceanbase.ob_t_1' doesn't exist
obclient> use test;
Database changed
obclient> explain select * from ob_t_1 t,ob_t_2 t1 where t.id=t1.id;
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Query Plan |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| =================================================================
|ID|OPERATOR |NAME |EST. ROWS|COST |
-----------------------------------------------------------------
|0 |EXCHANGE IN DISTR | |100001 |402319|
|1 | EXCHANGE OUT DISTR |:EX10001|100001 |274528|
|2 | MERGE JOIN | |100001 |274528|
|3 | EXCHANGE IN MERGE SORT DISTR | |100000 |125756|
|4 | EXCHANGE OUT DISTR (BROADCAST)|:EX10000|100000 |61860 |
|5 | TABLE SCAN |t |100000 |61860 |
|6 | TABLE SCAN |t1 |100000 |61860 |
=================================================================
Outputs & filters:
-------------------------------------
0 - output([t.id], [t.nam], [t1.id], [t1.nam]), filter(nil)
1 - output([t.id], [t.nam], [t1.id], [t1.nam]), filter(nil), dop=1
2 - output([t.id], [t.nam], [t1.id], [t1.nam]), filter(nil),
equal_conds([t.id = t1.id]), other_conds(nil)
3 - output([t.id], [t.nam]), filter(nil), sort_keys([t.id, ASC])
4 - output([t.id], [t.nam]), filter(nil), dop=1
5 - output([t.id], [t.nam]), filter(nil),
access([t.id], [t.nam]), partitions(p0)
6 - output([t1.id], [t1.nam]), filter(nil),
access([t1.id], [t1.nam]), partitions(p0)
|
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)