云服务器内容精选
-
RANGE_N with * for start-date 输入: CREATE MULTISET TABLE Orders5 ( StoreNo SMALLINT, OrderNo INTEGER, OrderDate DATE, OrderTotal INTEGER ) PRIMARY INDEX(OrderNo) PARTITION BY RANGE_N ( OrderDate BETWEEN DATE * AND DATE '2016-12-31' EACH INTERVAL '1' YEAR, DATE '2017-01-01' EACH INTERVAL '1' MONTH, DATE '2020-01-01' AND DATE '2020-12-31' EACH INTERVAL '1' DAY ); 输出: CREATE TABLE Orders5 ( StoreNo SMALLINT, OrderNo INTEGER, OrderDate DATE, OrderTotal INTEGER ) DISTRIBUTE BY HASH (OrderNo) PARTITION BY RANGE (OrderDate) ( PARTITION Orders5_0 START (DATE '0001-01-01') END (DATE '2016-12-31') EVERY (INTERVAL '1' YEAR), PARTITION Orders5_1 START (DATE '2016-12-31') END (DATE '2020-01-01') EVERY (INTERVAL '1' MONTH), PARTITION Orders5_2 START (DATE '2020-01-01') END (DATE '2020-12-31') EVERY (INTERVAL '1' DAY) );
-
RANGE_N with * for end-date 输入: CREATE SET TABLE Orders4 ( StoreNo SMALLINT, OrderNo INTEGER, OrderDate DATE, OrderTotal INTEGER ) PRIMARY INDEX(OrderNo) PARTITION BY RANGE_N ( OrderDate BETWEEN DATE '2010-01-01' AND '2016-12-31' EACH INTERVAL '1' YEAR, DATE '2017-01-01' EACH INTERVAL '1' MONTH, DATE '2019-01-01' AND * ); 输出: CREATE TABLE Orders4 ( StoreNo SMALLINT, OrderNo INTEGER, OrderDate DATE, OrderTotal INTEGER ) DISTRIBUTE BY HASH (OrderNo) PARTITION BY RANGE (OrderDate) ( PARTITION Orders4_0 START (DATE '2010-01-01') END (DATE '2016-12-31') EVERY (INTERVAL '1' YEAR), PARTITION Orders4_1 START (DATE '2016-12-31') END (DATE '2020-01-01') EVERY (INTERVAL '1' MONTH) , PARTITION Orders4_2 START (DATE '2020-01-01') END (MAXVALUE) );
-
RANGE_N with comma separated values 输入: CREATE TABLE orders10 (storeid INTEGER NOT NULL ,productid INTEGER NOT NULL ,orderdate DATE NOT NULL ,totalorders INTEGER NOT NULL) PRIMARY INDEX (storeid, productid) PARTITION BY ( RANGE_N(totalorders BETWEEN *, 100, 1000 AND *) ); 输出: CREATE TABLE orders10 (storeid INTEGER NOT NULL ,productid INTEGER NOT NULL ,orderdate DATE NOT NULL ,totalorders INTEGER NOT NULL) DISTRIBUTE BY HASH (storeid, productid) PARTITION BY RANGE (totalorders) ( PARTITION Orders10_0 END (100), PARTITION Orders10_1 END (1000), PARTITION Orders10_2 END (MAXVALUE) );
-
RANGE_N with different partition INTERVAL 输入: CREATE MULTISET TABLE tab1 ( TICD VARCHAR(10) , TCIT VARCHAR(10) , TCCM VARCHAR(50) , DW_Stat_Dt DATE ) PRIMARY INDEX ( TICD ) PARTITION BY RANGE_N ( DW_Stat_Dt BETWEEN DATE '0001-01-01' AND DATE '0001-01-04' EACH INTERVAL '1' DAY, DATE '0001-01-05' AND DATE '1899-12-31', DATE '1900-01-01' AND DATE '1900-01-01', DATE '1900-01-02' AND DATE '1999-12-31', DATE '2000-01-01' AND DATE '2009-12-31' EACH INTERVAL '1' YEAR, DATE '2010-01-01' AND DATE '2021-12-31' EACH INTERVAL '1' DAY, DATE '9999-12-31' AND DATE '9999-12-31', NO RANGE ); 输出: CREATE TABLE tab1 ( TICD VARCHAR( 10 ) , TCIT VARCHAR( 10 ) , TCCM VARCHAR( 50 ) , DW_Stat_Dt DATE ) DISTRIBUTE BY HASH (TICD) PARTITION BY RANGE (DW_Stat_Dt) ( PARTITION tab1_0 START (DATE '0001-01-01') END (DATE '0001-01-04') EVERY (INTERVAL '1' DAY), PARTITION tab1_1 START (DATE '0001-01-04') END (DATE '1899-12-31'), PARTITION tab1_2 START (DATE '1899-12-31') END (DATE '1900-01-01'), PARTITION tab1_ 3 START (DATE '1900-01-01') END (DATE '1999-12-31'), PARTITION tab1_4 START (DATE '1999-12-31') END (DATE '2009-12-31') EVERY (INTERVAL '1' YEAR) , PARTITION tab1_5 START (DATE '2009-12-31') END (DATE '2021-12-31') EVERY (INTERVAL '1' DAY) , PARTITION tab1_6 START (DATE '2021-12-31') END (DATE '9999-12-31') );
-
RANGE_N在字符串列的分区 输入: CREATE SET TABLE SC.TAB , NO FALLBACK, NO BEFORE JOURNAL, NO AFTER JOURNAL, CHECKSUM=DEFAULT, DEFAULT MERGEBLOCKRATIO ( ACCOUNT_NUM VARCHAR(255) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL ,ACCOUNT_MODIFIER_NUM CHAR(18) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL ,DATA_SOURCE_ID CHAR(10) CHARACTER SET LATIN NOT CASESPECIFIC ,END_DT DATE FORMAT 'YYYY-MM-DD' ,UPD_TXF_BATCHTD INTEGER COMPRESS ) PRIMARY INDEX XPKT0300_AGREEMENT (ACCOUNT_NUM,ACCOUNT_MODIFIER_NUM) PARTITION BY ( RANGE_N(DATA_SOURCE_ID BETWEEN 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' AND 'ZZ', NO RANGE ,UNKNOWN) ,CASE_N(END_DT IS NULL , NO CASE , UNKNOWN)) ; 输出: CREATE TABLE SC.TAB ( ACCOUNT_NUM VARCHAR( 255 ) /* CHARACTER SET LATIN*/ /* NOT CASESPECIFIC*/ NOT NULL ,ACCOUNT_MODIFIER_NUM CHAR( 18 ) /* CHARACTER SET LATIN*/ /* NOT CASESPECIFIC*/ NOT NULL ,DATA_SOURCE_ID CHAR( 10 ) /* CHARACTER SET LATIN*/ /* NOT CASESPECIFIC*/ ,END_DT DATE ,UPD_TXF_BATCHTD INTEGER /* COMPRESS */ ) DISTRIBUTE BY HASH ( ACCOUNT_NUM ,ACCOUNT_MODIFIER_NUM )/* PARTITION BY ( RANGE_N ( DATA_SOURCE_ID BETWEEN 'A' ,'B' ,'C' ,'D' ,'E' ,'F' ,'G' ,'H' ,'I' ,'J' ,'K' ,'L' ,'M' ,'N' ,'O' ,'P' ,'Q' ,'R' ,'S' ,'T' ,'U' ,'V' ,'W' ,'X' ,'Y' ,'Z' AND 'ZZ' ,NO RANGE ,UNKNOWN ) ,*/ /* CASE_N(END_DT IS NULL , NO CASE , UNKNOWN)) */ ;
-
通过DRS迁移MySQL分库分表总流程 本实践的主要任务流如图1所示: 图1 操作流程 表1 迁移流程 序号 步骤 说明 1 迁移前构造数据 迁移前在源端数据库构造数据,供迁移后查看是否迁移成功。 2 目标端DDM准备 创建VPC和安全组:为创建实例准备网络资源。 创建DDM实例:创建目标端DDM实例。 创建RDS for MySQ L实例 :创建DDM下关联的RDS for MySQL实例。 创建DDM账号:创建连接DDM逻辑库的账号。 创建逻辑库并关联RDS for MySQL实例:关联DDM与RDS for MySQL实例。 创建目标库表结构:在目标库创建表结构,供迁移数据使用。 3 迁移数据库 介绍创建DRS迁移任务和迁移的整体流程。 4 迁移后进行数据校验 通过DRS数据对比功能验证数据迁移结果。 父主题: MySQL分库分表迁移到DDM
更多精彩内容
CDN加速
GaussDB
文字转换成语音
免费的服务器
如何创建网站
域名网站购买
私有云桌面
云主机哪个好
域名怎么备案
手机云电脑
SSL证书申请
云点播服务器
免费OCR是什么
电脑云桌面
域名备案怎么弄
语音转文字
文字图片识别
云桌面是什么
网址安全检测
网站建设搭建
国外CDN加速
SSL免费证书申请
短信批量发送
图片OCR识别
云数据库MySQL
个人域名购买
录音转文字
扫描图片识别文字
OCR图片识别
行驶证识别
虚拟电话号码
电话呼叫中心软件
怎么制作一个网站
Email注册网站
华为VNC
图像文字识别
企业网站制作
个人网站搭建
华为云计算
免费租用云托管
云桌面云服务器
ocr文字识别免费版
HTTPS证书申请
图片文字识别转换
国外域名注册商
使用免费虚拟主机
云电脑主机多少钱
鲲鹏云手机
短信验证码平台
OCR图片文字识别
SSL证书是什么
申请企业邮箱步骤
免费的企业用邮箱
云免流搭建教程
域名价格