当前位置:网站首页>Import the data in MariaDB into columnstore
Import the data in MariaDB into columnstore
2022-07-24 11:34:00 【Yabingshi】
1 stay columnStore Empty meter built in
# View the table definition on the source side
show create table baidd.t1;
CREATE TABLE `t1` (
`id` int(11) NOT NULL,
`name` varchar(30) COLLATE utf8mb4_bin NOT NULL,
`name3` varchar(30) COLLATE utf8mb4_bin DEFAULT NULL,
PRIMARY KEY (`id`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
# Change the definition in the following table at the target end
# Change the storage engine to columnstore, Remove all indexes ( Include primary key ), Sort character sets and related information .
After the reform :
CREATE TABLE `t1` (
`id` INT(11) NOT NULL,
`name` VARCHAR(30) NOT NULL,
`name3` VARCHAR(30) DEFAULT NULL
) ENGINE=columnstore
2 Leading data
# Export on the source side
select * from baidd.t1 into outfile '/tmp/t1.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
# Copy the file to the target side
# stay columnStore Import in
grammar :
cpimport dbName tblName [ Load the file ]
Example :
cpimport baidd t1 /opt/t1.txt -E '"' -s ','
#-E Is the delimiter of the string
#-s Is the end character of the field
After importing, you will be prompted as follows :
2022-04-15 19:37:43 (7959) INFO : For table baidd.t1: 3 rows processed and 3 rows inserted.
2022-04-15 19:37:44 (7959) INFO : Bulk load completed, total run time : 1.08667 seconds
边栏推荐
- 【反序列化漏洞-01】序列化与反序列化简介
- Notes on @enableconfigurationproperties
- 【反序列化漏洞-02】PHP反序列化漏洞原理测试及魔术方法总结
- Classification and introduction of arm and series processors
- Ctfshow ThinkPHP topic 1
- 【Golang】golang中time类型的before方法
- tcp 服务端接收数据处理思路梳理,以及select: Invalid argument报错 笔记
- Grep actually uses ps/netstat/sort
- How to use SSH and SFTP protocols at home
- [markdown grammar advanced] make your blog more exciting (IV: set font style and color comparison table)
猜你喜欢

Nodejs ctf 基础
![08 [AIO programming]](/img/a6/156cb97e653190c76f22c88b758fef.png)
08 [AIO programming]

Nodejs CTF Foundation

Imeta view | is short reading long amplicon sequencing applicable to the prediction of microbiome function?

Cgo+gsoap+onvif learning summary: 9. Go and C conduct socket communication and onvif protocol processing

生信周刊第37期

MicroBlaze adds a custom IP core and attaches the Axi bus to realize ssd1306 OELD drive

Fifty lectures of Euler (I)

tcp 服务端接收数据处理思路梳理,以及select: Invalid argument报错 笔记

链表——142. 环形链表 II
随机推荐
[golang] deletion and emptying of map elements in golang
LogBack & MDC & a simple use
Paging query of employee information of black maredge takeout
【Golang】golang实现urlencode urldecode函数
C#入门系列(二十九) -- 预处理命令
黑马瑞吉外卖之员工信息分页查询
高频笔试题(蔚来)
Text message verification of web crawler
[golang] golang implements the post request to send form type data function
Blue Bridge Cup - binary conversion exercise
[QNX Hypervisor 2.2用户手册]9.2 cmdline
简单使用 MySQL 索引
Imeta view | is short reading long amplicon sequencing applicable to the prediction of microbiome function?
MySql的DDL和DML和DQL的基本语法
JPS has no namenode and datanode reasons
HDU5667 Sequence
Ctfshow ThinkPHP topic 1
链表——142. 环形链表 II
High frequency written test questions (Weilai)
Shell Scripting tips