MAPREDUCE服务 MRS-REGISTER INDEX TABLE:示例
示例
create database productdb;
use productdb;
CREATE TABLE productSalesTable(a int,b string,c string) stored as carbondata;
create index productNameIndexTable on table productSalesTable(c) as 'carbondata';
insert into table productSalesTable select 1,'a','aaa';
create database productdb2;
使用hdfs命令将productdb数据库下的productSalesTable和productNameIndexTable复制到productdb2。
refresh table productdb2.productSalesTable ;
refresh table productdb2.productNameIndexTable ;
explain select * from productdb2.productSalesTable where c = 'aaa'; //可以发现该查询命令没有使用索引表
REGISTER INDEX TABLE productNameIndexTable ON productdb2.productSalesTable;
explain select * from productdb2.productSalesTable where c = 'aaa'; //可以发现该查询命令使用了索引表
- GaussDB主键生成_GaussDB存储过程_高斯数据库主键生成_华为云
- 云数据库Gaussdb数据库索引_华为gaussdb__gaussdb 数据库
- MapReduce服务_什么是MapReduce服务_什么是HBase
- 分布式云原生集合示例_华为云分布式云原生_华为云UCS集合示例
- MapReduce服务_什么是ClickHouse_如何使用ClickHouse
- GaussDB(DWS)常用SQL_常用SQL命令_SQL语法
- MapReduce服务_如何使用MapReduce服务_MRS集群客户端安装与使用
- GaussDB查看表大小_GaussDB查询表空间_高斯数据库查看表大小-华为云
- MapReduce服务_什么是Loader_如何使用Loader
- 什么是Spark_如何使用Spark_Spark的功能是什么