TcaplusDB Client - show命令

TcaplusDB Client的使用方法参见文档

1. 功能说明

show tables可查询当前连接的TcaplusDB中的所有数据表名。

show status可查询当前的连接状态,目录服务器信息以及接入层信息。

show shard可查询表或者某条记录所在的shard

show last_access_time可查询Generic表中某条记录的最新更新时间

show hashcode可根据表的元数据离线查询记录key的hashcode(3.55.0开始支持)

2. 启始版本

3.40.0

3. 命令语法

tcaplus> help show;
--------------------------------------------------------------------------------
show tables    output all table names

show status    output appID, zoneID, dir server status, tcaproxy status,
               all the dir server addresses

show shard from <table> [where key1=*** and key2=***](full key)
               show shard ids of the table, if use where clause, show shard id of the record in table.

show last_access_time from <table> where key1=*** and key2=*** (full key)
               show last_access_time of the record in table, only generic tables are supported.

show hashcode from <table> where key1=*** and key2=*** (full key) using tdr/proto
               show hashcode of the record in tdr/pb table, 'using tdr' for tdr table, 'using proto' for pb table.
               metadata needs to be specified via -T or -P when starting the tcaplus_client tool.
               this command can be run in offline mode entered with the -o parameter when starting the tcaplus_client tool.
--------------------------------------------------------------------------------

4. 命令示例

tcaplus> show tables;

----------------------------------------------------------
| Table Name                         Type      Protocol  |
----------------------------------------------------------
| test_table                         GENERIC   TDR       |
| tbMailTest                         LIST      PROTOBUF  |
| pb_generic_index_shardingkey       GENERIC   PROTOBUF  |
| pb_generic_index_noshardkey        GENERIC   PROTOBUF  |
| pb_generic_noindex_noshardkey      GENERIC   PROTOBUF  |
| pb_list                            LIST      PROTOBUF  |
| pb_list2                           LIST      PROTOBUF  |
| pb_sortedlist                      LIST      PROTOBUF  |
| aes_info                           GENERIC   TDR       |
| auth_info                          GENERIC   TDR       |
| depend_me_services                 GENERIC   TDR       |
| host_info                          GENERIC   TDR       |
| instance_info                      GENERIC   TDR       |
| node_info                          GENERIC   TDR       |
| service_depends                    GENERIC   TDR       |
| service_info                       GENERIC   TDR       |
| token_info                         GENERIC   TDR       |
| cl_list                            LIST      PROTOBUF  |
| cl_generic                         GENERIC   PROTOBUF  |
| table_generic                      GENERIC   TDR       |
----------------------------------------------------------
tcaplus> show status;

------------------------------------------------------------------
Access_id(app_id) = 2
------------------------------------------------------------------
TableGroup_id(zone_id) = 3
------------------------------------------------------------------
[dir_server_url]
                 dir_server_url[0]: 9.135.8.93:9999
------------------------------------------------------------------
[Proxys]
                 proxy[0]:tcp://9.135.8.93:13755 CONNECTED Authened
                 proxy[1]:tcp://9.135.8.93:13756 CONNECTED Authened
------------------------------------------------------------------
[The connected dir server]
                 tcp://9.135.8.93:9999
------------------------------------------------------------------
tcaplus> show shard from IDAllocc;
shard id: 7224852

tcaplus> show shard from IDAllocc where IDType=1;
shard id: 7224852
tcaplus> show last_access_time from IDAllocc where IDType=1;
last_access_time: 1746500784
./tcaplus_client --offline --debug --proto ./542a223a399115348b8db7a5df4c2a73.proto
====== You have entered the OFFLINE-MODE of the tcaplus_client tool ======

tcaplus> show hashcode from hashcodetest where a=1 and b=1 and c=1 and d="1" using proto;
the hash code of key is 9536

results matching ""

    No results matching ""