云主机开年特惠28.8元/年,0元秒杀等你来抢!
查看详情

活动

天翼云最新优惠活动,涵盖免费试用,产品折扣等,助您降本增效!
热门活动
  • 安全隔离版OpenClaw NEW OpenClaw云服务器专属“龙虾“套餐低至1.5折起
  • 天翼云新春焕新季 NEW 云主机开年特惠28.8元/年,0元秒杀等你来抢!
  • 云上钜惠 爆款云主机全场特惠,2核4G只要1.8折起!
  • 中小企业服务商合作专区 国家云助力中小企业腾飞,高额上云补贴重磅上线
  • 出海产品促销专区 NEW 爆款云主机低至2折,高性价比,不限新老速来抢购!
  • 天翼云奖励推广计划 加入成为云推官,推荐新用户注册下单得现金奖励
免费活动
  • 免费试用中心 HOT 多款云产品免费试用,快来开启云上之旅
  • 天翼云用户体验官 NEW 您的洞察,重塑科技边界

息壤智算

领先开放的智算服务平台,提供算力、平台、数据、模型、应用“五位一体”智算服务体系,构建全流程的AI基础设施能力
AI Store
  • 算力市场
  • 模型市场
  • 应用市场
  • MCP市场
公共算力服务
  • 裸金属
  • 定制裸金属
训推服务
  • 模型开发
  • 训练任务
  • 服务部署
模型推理服务
  • 模型广场
  • 体验中心
  • 服务接入
应用托管
  • 应用实例
科研助手
  • 科研智能体
  • 科研服务
  • 开发机
  • 并行计算
大模型
  • DeepSeek-V3.1
  • DeepSeek-R1-0528
  • DeepSeek-V3-0324
  • Qwen3-235B-A22B
  • Qwen3-32B
智算一体机
  • 智算一体机
模型适配专家服务
  • 模型适配专家服务
算力服务商
  • 入驻算力服务商

应用商城

天翼云精选行业优秀合作伙伴及千余款商品,提供一站式云上应用服务
进入甄选商城进入云市场进入AI Store创新解决方案公有云生态专区智云上海应用生态专区
建站工具
  • 新域名服务
  • SSL证书
  • 翼建站
企业办公
  • 安全邮箱
  • WPS 365 天翼云版
  • 天翼企业云盘(标准服务版)
灾备迁移
  • 云管家2.0
  • 翼备份(SaaS版)

定价

协助您快速了解云产品计费模式、价格详情,轻松预估上云成本
价格计算器
  • 动态测算产品价格
定价策略
  • 快速了解计费模式

合作伙伴

天翼云携手合作伙伴,共创云上生态,合作共赢
天翼云生态合作中心
  • 天翼云生态合作中心
天翼云渠道合作伙伴
  • 天翼云代理渠道合作伙伴
天翼云服务合作伙伴
  • 天翼云集成商交付能力认证
天翼云应用合作伙伴
  • 天翼云云市场合作伙伴
  • 天翼云甄选商城合作伙伴
天翼云技术合作伙伴
  • 天翼云OpenAPI中心
天翼云培训认证
  • 天翼云学堂
  • 天翼云市场商学院
天翼云合作计划
  • 云汇计划
天翼信创云专区
  • 信创云专区
  • 适配互认证

开发者

开发者相关功能入口汇聚
技术社区
  • 专栏文章
  • 互动问答
  • 技术视频
资源与工具
  • OpenAPI中心
培训与认证
  • 天翼云学堂
  • 天翼云认证
开源社区
  • 魔乐社区
  • OpenTeleDB

支持与服务

为您提供全方位支持与服务,全流程技术保障,助您轻松上云,安全无忧
文档与工具
  • 文档中心
  • 新手上云
  • 自助服务
  • OpenAPI中心
定价
  • 价格计算器
  • 定价策略
基础服务
  • 售前咨询
  • 在线支持
  • 在线支持
  • 工单服务
  • 服务保障
  • 会员中心
增值服务
  • 红心服务
  • 首保服务
  • 客户支持计划
  • 专家技术服务
  • 备案管家
我要反馈
  • 建议与反馈
  • 用户体验官
信息公告
  • 客户公告

了解天翼云

天翼云秉承央企使命,致力于成为数字经济主力军,投身科技强国伟大事业,为用户提供安全、普惠云服务
品牌介绍
  • 关于天翼云
  • 智算云
  • 天翼云4.0
  • 新闻资讯
  • 天翼云APP
基础设施
  • 全球基础设施
  • 信任中心
最佳实践
  • 精选案例
  • 超级探访
  • 云杂志
  • 分析师和白皮书
  • 天翼云·创新直播间
市场活动
  • 2025智能云生态大会
  • 2024智算云生态大会
  • 2023云生态大会
  • 2022云生态大会
  • 天翼云中国行
天翼云
  • 活动
  • 息壤智算
  • 产品
  • 解决方案
  • 应用商城
  • 定价
  • 合作伙伴
  • 开发者
  • 支持与服务
  • 了解天翼云
      • 文档
      • 控制中心
      • 备案
      • 管理中心
      时序数据库Influx版_相关内容
      • where 条件使用
        本文为您介绍如何在使用SELECT语法时添加where条件。 单条件查询 plaintext teledb select from teledbpg where id 1; id nickname + 1 teledb 1 hello,pgxc (2 rows) 多条件and plaintext teledb select from teledbpg where id 1 and nickname like '%h%' ; id nickname + 1 hello,pgxc (1 row) 多条件or plaintext teledb select from teledbpg where id 1 or nickname like '%p%' ; id nickname + 1 teledb 1 hello,pgxc 3 pg (3 rows) ilike 不区分大小写匹配 plaintext teledb insert into teledbpg values(2,'TELEDB'); INSERT 0 1 teledb select from teledbpg where nickname ilike '%te%'; id nickname + 1 teledb 2 TELEDB (2 rows) where 条件也能支持子查询 plaintext teledb select from teledbpg where id(select (random())::integer from teledbpg order by random() limit 1); id nickname + (0 rows) teledb select from teledbpg where id(select (random())::integer from teledbpg order by random() limit 1); id nickname + 1 teledb 1 hello,pgxc (2 rows) null 值查询方法 plaintext teledb select from teledbpg where nickname is null; id nickname + 4 (1 row) teledb select from teledbpg where nickname is not null; id nickname + 1 teledb 3 pg 1 hello,pgxc 2 TELEDB (4 rows) exists 只要有记录返回就为真 plaintext teledb
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        where 条件使用
      • 存储组管理
        drop table t1; DROP TABLE teledb drop sharding in group defaultgroup; DROP SHARDING GROUP teledb drop node group defaultgroup; DROP NODE GROUP 修改存储组 修改存储组只能将存储组定义为默认存储组,语法如下 plaintext alter node group groupname set to default; 当已存在默认存储组的情况下,此语句无法生效 plaintext teledb create node group group1 with (dn01); CREATE NODE GROUP teledb create node group group2 with (dn02); CREATE NODE GROUP teledb alter node group group1 set to default; ALTER NODE GROUP teledb alter node group group2 set to default; ERROR: default group already exists, groupoid:57352 查看存储组相关信息 plaintext teledb select oid, from pgxcgroup; oid groupname defaultgroup groupmembers +++ 57353 group2 0 16386 57352 group1 1 16385
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        存储组管理
      • copy使用
        ! cat /home/teledb/t.txt 1,张三,20001201 00:00:00,北京 2,李四,19970324 00:00:00,上海 3,王五,20040901 00:00:00,广州 4,赵六,20001201 00:00:00, teledb copy t from '/home/teledb/t.txt' (format 'csv'); ERROR: node:dn02, backendpid:21393, nodename:dn02,backendpid:21393,message:null value in column "city" violates notnull constraint DETAIL: Failing row contains (4, 赵六, 20001201 00:00:00, null). 不使用FORCENOTNULL处理的话就变成NULL值。 plaintext teledb copy t from '/home/teledteledb create table tjson(id int,fjson json); CREATE TABLE b/t.txt' (format 'csv', forcenotnull(city)); COPY 4 teledb select from t; id name birth city +++ 1 张三 20001201 00:00:00 北京 2 李四 19970324 00:00:00 上海 3 王五 20040901 00:00:00 广州 4 赵六 20001201 00:00:00 (4 rows) 使用FORCENOTNULL处理就变成长度为0的字符串。 encoding 指定导入文件的编码 plaintext copy test from '/home/teledb/test.txt'; 不指定导入文件的编码格式,则无法正确导入中文字符。 plaintext teledb copy test from '/home/teledb/test.txt'; ERROR: invalid byte sequence for encoding "UTF8": 0xbf CONTEXT: COPY test, line 3, nodetype:1(1:cn,0:dn) teledb
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        copy使用
      • 只查某个DN的数据
        本文介绍只查询某个DN数据的操作。 plaintext teledb execute direct on (dn01) 'select from teledbpg'; id nickname + 1 teledb 1 hello,pgxc 2 TELEDB (3 rows) teledb execute direct on (dn02) 'select from teledbpg'; id nickname + 3 pg 4 (2 rows)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        只查某个DN的数据
      • 聚合函数并发计算
        本文介绍如何在使用SELECT语法时进行聚合函数并发计算。 plaintext teledb set maxparallelworkerspergather to 0; SET Time: 0.214 ms teledb select count(1) from tcount; count 20000000 (1 row) Time: 2700.569 ms (00:02.701) teledb set maxparallelworkerspergather to 2; SET Time: 0.269 ms teledb select count(1) from tcount; count 20000000 (1 row) Time: 1867.719 ms (00:01.868)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        聚合函数并发计算
      • 多表关联
        本文为您介绍SELECT语法中多表关联的使用方法。 内连接 plaintext teledb select from teledbpg inner join teledbpg1 on teledbpg.id teledbpg1.id; id nickname id nickname +++ 3 pg 3 pg (1 row) 左外连接 plaintext teledb select from teledbpg left join teledbpg1 on teledbpg.id teledbpg1.id; id nickname id nickname +++ 1 teledb 1 hello,pgxc 2 TELEDB 3 pg 3 pg 4 (5 rows) 右外连接 plaintext teledb select from teledbpg right join teledbpg1 on teledbpg.id teledbpg1.id; id nickname id nickname +++ 5 test 3 pg 3 pg (2 rows) 全连接 plaintext teledb select from teledbpg full join teledbpg1 on teledbpg.id teledbpg1.id; id nickname id nickname +++ 1 teledb 3 pg 3 pg 4 1 hello,pgxc 2 TELEDB 5 test (6 rows)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        多表关联
      • 分页查询
        本文为您介绍如何在使用SELECT语法时进行分页查询。 默认从第一条开始,返回一条记录。 plaintext teledb select from teledbpg limit 1; id nickname + 1 teledb (1 row) 使用offset指定从第几条开始,0表示第一条开始,返回1条记录。 plaintext teledb select from teledbpg limit 1 offset 0; id nickname + 1 teledb (1 row) 从第3条开始,返回二条记录。 plaintext teledb select from teledbpg limit 2 offset 2; id nickname + 2 TELEDB 3 pg (2 rows) 上面的语句没有使用排序,返回结果不可预知,使用order by 可以获得一个有序的结果。 plaintext teledb select from teledbpg order by nickname; id nickname + 1 hello,pgxc 3 pg 1 teledb 2 TELEDB 4 (5 rows) teledb select from teledbpg order by nickname limit 2 offset 2; id nickname + 1 teledb 2 TELEDB (2 rows)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        分页查询
      • 数据排序
        本文为您介绍如何在使用SELECT语法时进行排序。 按某一列排序 plaintext teledb create table teledbpg(id int, nickname text); CREATE TABLE teledb insert into teledbpg values(1,'teledb'),(3,'pg'),(1,'hello,pgxc'); COPY 3 teledb select from teledbpg order by nickname; id nickname + 1 hello,pgxc 3 pg 1 teledb (3 rows) 按第一列排序 plaintext teledb select from teledbpg order by 1; id nickname + 1 teledb 1 hello,pgxc 3 pg 按ID 升级排序,再按 nickname 降序排序 plaintext teledb select from teledbpg order by id,nickname desc; id nickname + 1 teledb 1 hello,pgxc 3 pg (3 rows) 效果与上面的语句一样 plaintext teledb select from teledbpg order by 1,2 desc; id nickname + 1 teledb 1 hello,pgxc 3 pg (3 rows) 随机排序 plaintext teledb select from teledbpg order by random(); id nickname + 1 teledb 3 pg 1 hello,pgxc (3 rows) teledb select from teledbpg order by random(); id nickname + 1 hello,pgxc 1 teledb 3 pg (3 rows) 计算排序 plaintext teledb
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        数据排序
      • 自定义复合类型
        本文为您介绍如何增加一个复合类型。 增加一个复合类型 plaintext teledb create type mytype as (f1 int,f2 varchar(10)); CREATE TYPE
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        自定义复合类型
      • Teledb公共库安装部署
        该任务用于指导软件工程师安装部署teledb公共配置库。 该任务用于指导软件工程师安装部署teledb公共配置库。 前提条件 已初始化环境。 操作步骤 请您参照如下步骤安装teledb公共库。 1. 上传部署包 上传monitor 控制台安装包:teledbtelemonitor . tar到/app 目录下的teledb目录。 2. 解压部署包 执行如下命令解压monitor控制台部署包 plaintext tarzxvfteledbtelemonitor .tar.gzC /app/teledb 3. 手动安装部署依赖(单节点只需初始化部署主机,高可用需要初始化每一台主机) 执行如下命令,进入package/envinit/x86目录。 plaintext cd package/envinit/x86 执行如下命令,解压部署包。 plaintext tar zxvf envInitx86.tar.gz 得到如下目录: plaintext envInit/ envInit/installjdk.sh envInit/jdk/ envInit/jdk/jdk8u201linuxx64.tar.gz envInit/sshpass1.062.el7.x8664.rpm envInit/pv1.4.61.el7.x8664.rpm envInit/lz41.7.53.el7.x8664.rpm envInit/libaio0.3.10913.el7.x8664.rpm 执行如下命令,安装jdk。 plaintext cd envInit/ sh installjdk.sh 出现如下回显信息,表示安装成功。 plaintext install and config java success. 安装成功后,执行如下命令更新环境变量。 plaintext source /etc/profile 执行如下命令安装部署依赖。 plaintext rpm ivh force nodeps nosignature libaio0.3.10913.el7.x8664.rpm rpm ivh force nodeps nosignature lz41.7.53.el7.x8664.rpm rpm ivh force nodeps nosignature pv1.4.61.el7.x8664.rpm rpm ivh force nodeps nosignature sshpass1.062.el7.x8664.rpm (可选)执行如下命令,检查perl是否安装。 plaintext yum install y perl 4. 部署monitor控制台 执行如下命令,进入目录 plaintext cd /app/teledb cd consoledeploy/conf/ Vi tele.ini 参考如下内容,修改tele.ini配置文件 plaintext ;package and directory info [package] ;cputype 填写范围 ,指预置区的芯片类型 x86、arm CPUTYPEx86 PACKAGEMAINDIR/app
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        安装部署手册
        安装过程
        Teledb公共库安装部署
      • TRUNCATE操作
        truncate ttimerange partition for ('20170901' ::timestamp without time zone); TRUNCATE TABLE teledb select from ttimerange; f1 f2 f3 ++ 1 20171001 00:00:00 100 1 20171101 00:00:00 100 (2 rows) truncate 一个数字分区表。 plaintext teledb select from trange; f1 f2 f3 ++ 1 20230823 10:29:46.263768 1 2 20230823 10:29:46.263768 50 2 20230823 10:29:46.263768 110 3 20230823 10:29:46.263768 100 (4 rows) teledb d+ trange Table "public.trange" Column Type Collation Nullable Default Storage Stats target Description +++++++ f1 bigint plain f2 timestamp without time zone now() plain f3 integer plain Distribute By: SHARD(f1) Location Nodes: ALL DATANODES Partition By: RANGE(f3) Of Partitions: 3 Start With: 1 Interval Of Partition: 50 teledb truncate trange partition for (1); TRUNCATE TABLE teledb truncate trange partition for (2); TRUNCATE TABLE teledb select from trange; f1 f2 f3 ++ 2 20230823 10:29:46.263768 110 3 20230823 10:29:46.263768 100 (2 rows)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        TRUNCATE操作
      • 修改表结构
        添加外键 plaintext teledb create table tp(f1 int not null,f2 int ,primary key(f1)); CREATE TABLE teledb create table tf(f1 int not null,f2 int ); CREATE TABLE teledb ALTER TABLE tf ADD CONSTRAINT tff1fkey FOREIGN KEY (f1) REFERENCES tp (f1); ALTER TABLE teledb d+ tf Table "public.tf" Column Type Collation Nullable Default Storage Stats target Description +++++++ f1 integer not null plain f2 integer plain Foreignkey constraints: "tff1fkey" FOREIGN KEY (f1) REFERENCES tp(f1) Distribute By: SHARD(f1) Location Nodes: ALL DATANODES 外键使用限制: 外键只是同一个节点内约束有效果,所以外键字段和对应主键字段必需都是表的分布键,否则由于数据分布于不同的节点内会导致更新失败。 分区表和冷热分区表也不支持外键,数据分区后位于不同的物理文件中,无法约束。 删除外键 plaintext teledb ALTER TABLE tf DROP CONSTRAINT tff1fkey; ALTER TABLE 修改表所属模式 plaintext teledb create schema teledb; CREATE SCHEMA teledb dt t List of relations Schema Name Type Owner +++ public t table teledb (1 row) teledb alter table t set schema teledb; ALTER TABLE teledb dt t List of relations Schema Name Type Owner +++ teledb t table teledb (1 row) 修改表所属用户 plaintext teledb
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        修改表结构
      • gin索引
        create index tarraymcidx on tarray using gin(mc); CREATE INDEX Time: 7997.138 ms (00:07.997) teledb explain select from tarray where mc @> ('{'md5('1')'}')::text[]; QUERY PLAN Remote Fast Query Execution (cost0.00..0.00 rows0 width0) Node/s: dn01, dn02 > Bitmap Heap Scan on tarray (cost39.41..5129.82 rows2503 width61) Recheck Cond: (mc @> ((('{'::text 'c4ca4238a0b923820dcc509a6f75849b'::text) '}'::text))::text[]) > Bitmap Index Scan on tarraymcidx (cost0.00..38.78 rows2503 width0) Index Cond: (mc @> ((('{'::text 'c4ca4238a0b923820dcc509a6f75849b'::text) '}'::text))::text[]) (6 rows) Time: 6.136 ms teledb select from tarray where mc @> ('{'md5('1')'}')::text[]; id mc + 1 {c4ca4238a0b923820dcc509a6f75849b} (1 row) Time: 2.689 ms btreegin任意字段索引 plaintext teledb create table ginmul(f1 int, f2 int, f3 timestamp, f4 text, f5 numeric, f6 text); CREATE TABLE teledb insert into ginmul select random()5000, random()6000, now()+((3000060000random())' sec')::interval , md5(random()::text), round((random()100000)::numeric,2), md5(random()::text) from generateseries(1,1000000); INSERT 0 1000000 teledb create extension btreegin; CREATE EXTENSION teledb
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        索引管理
        gin索引
      • 多字段索引
        本文为您介绍如何使用多字段索引。 plaintext teledb create table tmulidx (f1 int,f2 int,f3 int,f4 int); CREATE TABLE teledb create index tmulidxidx on tmulidx(f1,f2,f3); CREATE INDEX 多字段使用注意事项: or 查询条件 bitmap scan 最多支持两个不同字段条件。 plaintext teledb insert into tmulidx select t,t,t,t from generateseries(1,1000000) as t; INSERT 0 1000000 teledb analyze ; ANALYZE teledb explain select from tmulidx where f11 or f22 ; QUERY PLAN Remote Fast Query Execution (cost0.00..0.00 rows0 width0) Node/s: dn001, dn002 > Bitmap Heap Scan on tmulidx (cost7617.08..7621.07 rows2 width16) Recheck Cond: ((f1 1) OR (f2 2)) > BitmapOr (cost7617.08..7617.08 rows2 width0) > Bitmap Index Scan on tmulidxidx (cost0.00..2.43 rows1 width0) Index Cond: (f1 1) > Bitmap Index Scan on tmulidxidx (cost0.00..7614.65 rows1 width0) Index Cond: (f2 2) (9 rows) Time: 5.134 ms teledb explain select from tmulidx where f11 or f22 or f13 ; QUERY PLAN Remote Fast Query Execution (cost0.00..0.00 rows0 width0) Node/s: dn001, dn002 > Bitmap Heap Scan on tmulidx (cost7619.51..7625.49 rows3 width16) Recheck Cond: ((f1 1) OR (f2 2) OR (f1 3)) > BitmapOr (cost7619.51..7619.51 rows3 width0) > Bitmap Index Scan on tmulidxidx (cost0.00..2.43 rows1 width0) Index Cond: (f1 1) > Bitmap Index Scan on tmulidxidx (cost0.00..7614.65 rows1 width0) Index Cond: (f2 2) > Bitmap Index Scan on tmulidxidx (cost0.00..2.43 rows1 width0) Index Cond: (f1 3) (11 rows) Time: 5.048 ms teledb
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        索引管理
        多字段索引
      • gist 索引
        本文为您介绍如何使用gist 索引。 注意 此功能需加载插件pgtrgm。 plaintext teledb create extension pgtrgm; CREATE EXTENSION teledb create table ttrgm (id int,trgm text,notrgm text) ; ERROR: relation "ttrgm" already exists teledb create index ttrgmtrgmidx on ttrgm using gist(trgm gisttrgmops); CREATE INDEX
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        索引管理
        gist 索引
      • 安装包与系统版本不匹配导致安装失败
        当安装包与系统版本不匹配导致安装失败时,您可以参考本文,查看问题现象、原因和解决方案。 问题现象 安装dcp控制体出现安装报错,执行删除冲突的安装包,但删除不了。 原因分析 安装包与操作系统版本不一致,操作系统版本过高导致的。 解决方案 升级安装包,使其匹配操作系统版本。
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        安装部署手册
        常见问题
        安装包与系统版本不匹配导致安装失败
      • 实例开通时,勾选备份机导致开通实例失败
        本文为您介绍实例开通时,勾选备份机导致开通实例失败的问题现象、原因和解决方案。 问题现象 提交工单后,在工单管理中显示实例施工失败。 原因分析 勾选备份机导致开通实例失败。 解决方案 去勾选备份机,重新提交工单。
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        安装部署手册
        常见问题
        实例开通时,勾选备份机导致开通实例失败
      • 提交工单显示系统错误
        当提交工单显示系统错误时,您可以参考本文,查看问题现象、问题原因和解决方案。 问题现象 提交工单显示系统错误。 查看日志发现是sql插入有问题,instmanager的vip列插入失败。 原因分析 开通实例使用到了8个vip,给的varchar字符窜长度不够。 解决方案 执行如下命令增加vip列的varchar长度,将其修改为255。 plaintext usedcp descinstmanager altertableinstmanagermodifycolumnvipvarchar(255);
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        安装部署手册
        常见问题
        提交工单显示系统错误
      • 条件索引
        drop index tsexsexidx; DROP INDEX teledb create index tsexsexidx on tsex (sex) where sex '女'; CREATE INDEX teledb analyze tsex; ANALYZE teledb explain select from tsex where sex '男'; QUERY PLAN Remote Fast Query Execution (cost0.00..0.00 rows0 width0) Node/s: dn01, dn02 > Seq Scan on tsex (cost0.00..9966.58 rows500539 width8) Filter: (sex '男'::text) (4 rows) teledb explain select from tsex where sex '女'; QUERY PLAN Remote Fast Query Execution (cost0.00..0.00 rows0 width0) Node/s: dn01, dn02 > Index Scan using tsexsexidx on tsex (cost0.14..13.15 rows67 width8) (3 rows) teledb q [teledb@localhost bin]$ ./telesql p 22222 U teledb d teledb Password for user teledb: telesql (TeleDB V6) Type "help" for help. teledb di+ tsexsexidx List of relations Schema Name Type Owner Table Size Allocated Size Description +++++++ public tsexsexidx index teledb tsex 16 kB 16 kB (1 row)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        索引管理
        条件索引
      • 普通索引
        本文为您介绍如何管理普通索引。 plaintext teledb create index tididx on t1 using btree(id); CREATE INDEX
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        索引管理
        普通索引
      • 添加分区子表
        本文为您介绍如何添加分区子表。 plaintext teledb d+ trange Table "public.trange" Column Type Collation Nullable Default Storage Stats target Description +++++++ f1 bigint plain f2 timestamp without time zone now() plain f3 integer plain Distribute By: SHARD(f1) Location Nodes: ALL DATANODES Partition By: RANGE(f3) Of Partitions: 3 Start With: 1 Interval Of Partition: 50 teledb alter table trange add partitions 2; ALTER TABLE teledb d+ trange Table "public.trange" Column Type Collation Nullable Default Storage Stats target Description +++++++ f1 bigint plain f2 timestamp without time zone now() plain f3 integer plain Distribute By: SHARD(f1) Location Nodes: ALL DATANODES Partition By: RANGE(f3) Of Partitions: 5 Start With: 1 Interval Of Partition: 50
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        数据表管理
        添加分区子表
      • 指定模式创建表
        本文为您介绍如何指定模式创建表。 plaintext teledb create table public.t1(id int,mc text); CREATE TABLE
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        数据表管理
        指定模式创建表
      • 使用 IF NOT EXISTS
        本页为您介绍如何使用使用 IF NOT EXISTS关键字。 带IF NOT EXISTS 关键字作用表示表不存在时才创建。 plaintext teledb create table t(id int,mc text); CREATE TABLE teledb create table t(id int,mc text); ERROR: relation "t" already exists teledb create table IF NOT EXISTS t(id int,mc text); NOTICE: relation "t" already exists, skipping CREATE TABLE
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        数据表管理
        使用 IF NOT EXISTS
      • 逻辑分区表
        CREATE TABLE tnativelistdefault PARTITION OF tnativelist DEFAULT; CREATE TABLE teledb insert into tnativelist values(1,'上海',1,currentdate); INSERT 0 1 多级分区表 创建主表 plaintext teledb create table tnativemullist(f1 bigserial not null,f2 integer,f3 text,f4 text, f5 date) partition by list ( f3 ) distribute by shard(f1); CREATE TABLE 创建二级表 plaintext teledb create table tnativemullistgd partition of tnativemullist for values in ('广东') partition by range(f5); CREATE TABLE teledb create table tnativemullistbj partition of tnativemullist for values in ('北京') partition by range(f5); CREATE TABLE teledb create table tnativemullistsh partition of tnativemullist for values in ('上海'); 创建三级表 plaintext teledb create table tnativemullistgd201701 partition of tnativemullistgd(f1,f2,f3,f4,f5) for values from ('20170101') to ('20170201'); CREATE TABLE teledb create table tnativemullistgd201702 partition of tnativemullistgd(f1,f2,f3,f4,f5) for values from ('20170201') to ('20170301'); CREATE TABLE teledb create table tnativemullistbj201701 partition of tnativemullistbj(f1,f2,f3,f4,f5) for values from ('20170101') to ('20170201'); CREATE TABLE teledb create table tnativemullistbj201702 partition of tnativemullistbj(f1,f2,f3,f4,f5) for values from ('20170201') to ('20170301'); CREATE TABLE 查看表结构 plaintext teledb d+ tnativemullist Table "public.tnativemullist" Column Type Collation Nullable Default Storage Stats target Description +++++++ f1 bigint not null nextval('tnativemullistf1seq'::regclass) plain f2 integer plain f3 text extended f4 text extended f5timestamp(0) without time zone plain Partition key: LIST (f3) Partitions: tnativemullistbj FOR VALUES IN ('北京'), PARTITIONED, tnativemullistgd FOR VALUES IN ('广东'), PARTITIONED, tnativemullistsh FOR VALUES IN ('上海') Distribute By: SHARD(f1) Location Nodes: ALL DATANODES teledb
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        数据表管理
        逻辑分区表
      • 配置访问模式的顺序
        本文为您介绍如何配置访问模式的顺序。 TeleDB有一个运行变量叫searchpath,其值为模式名列表,用于配置访问数据对象的顺序,如下所示。 当前连接用户。 plaintext teledb select currentuser; currentuser teledb (1 row) 显示当前searchpath,搜索路径只配置为$user , public,其中 $user 为当前用户名,即上面的currentuser 值teledb 。 plaintext teledb show searchpath; searchpath "$user", public (1 row) 不指定模式创建数据表,则该表存放于第一个搜索模式下面。第一个模式找不到的情况下选择第二个,依次顺序查找。 plaintext teledb create table t2(id int, content text); CREATE TABLE teledb dt t2 List of relations Schema Name Type Owner +++ public t2 table teledb (1 row) 由于没有teledb模式,所以表默认放到了public模式下 创建teledb模式后再次建表,表建到了teledb模式下 teledb create schema teledb; CREATE SCHEMA teledb create table t3(id int, content text); CREATE TABLE teledb dt t3 List of relations Schema Name Type Owner +++ teledb t3 table teledb (1 row) 指定表位于某个模式下,不同模式下表名可以相同。在public模式下创建t3表 plaintext teledb create table public.t3(id int, content text); CREATE TABLE teledb dt public.t3 List of relations Schema Name Type Owner +++ public t3 table teledb (1 row) 同名的表查询时,没有指定shema时,始终只会查到前面模式的表数据。 plaintext 插入数据到public.t3表 teledb
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        模式管理
        配置访问模式的顺序
      • exists子句在大数据量场景调大work_mem性能更好
        exists子句在数据量比较大的情况下,优化器选择走Hash Semi Join,而在调大workmem后,优化器执行走Hash Join,性能会更好。本文为您介绍该场景下的详细测试情况。 以下是关于该场景的测试情况: 1. workmem默认4MB时,SQL执行计划和耗时情况如下: 可以看到,优化器选择走了Hash Semi Join,耗时3.7秒。 teledb explain select count(1) from t1 where exists(select 1 from t2 where t2.t1f1t1.f1); QUERY PLAN Finalize Aggregate (cost242218.32..242218.33 rows1 width8) > Remote Subquery Scan on all (dn001,dn002) (cost242218.30..242218.32 rows1 width0) > Partial Aggregate (cost242118.30..242118.31 rows1 width8) > Hash Semi Join (cost110248.00..242118.30 rows505421 width0) Hash Cond: (t1.f1 t2.t1f1) > Seq Scan on t1 (cost0.00..17420.00 rows1000000 width4) > Hash (cost79340.00..79340.00 rows3000000 width4) > Remote Subquery Scan on all (dn001,dn002) (cost100.00..79340.00 rows3000000 width4) Distribute results by S: t1f1 > Seq Scan on t2 (cost0.00..52240.00 rows3000000 width4) (10 rows) Time: 1.091 ms teledb select count(1) from t1 where exists(select 1 from t2 where t2.t1f1t1.f1); count 500000 (1 row) Time: 3779.401 ms (00:03.779) 2. workmem调整为128MB后,SQL执行计划和耗时情况如下: 可以看到,优化器选择走了Hash Join,耗时1.9秒。 teledb
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品
        SQL开发最佳实践
        性能优化最佳实践
        SQL优化案例
        exists子句在大数据量场景调大work_mem性能更好
      • 实例主机手动创建了teledbx用户导致开通实例失败
        本文为您介绍实例主机手动创建了teledbx用户导致开通实例失败的问题原因和解决方案。 问题现象 创建实例开通失败。 原因分析 经过查看错误日志,发现其手动创建teledbx用户。由于在开通创建实例时,系统会自动创建teledbx用户,无需手动创建。 解决方案 1. 执行如下命令删除实例主机teledbx用户。 plaintext userdel teledbx 2. 在管控台中选择实例管理> 工单管理 ,单击所创建实例行所在的操作列的重新施工即可。
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        安装部署手册
        常见问题
        实例主机手动创建了teledbx用户导致开通实例失败
      • 创建的目录、文件权限不足
        本文为您介绍创建的目录、文件权限不足的问题现象、问题原因和解决方案。 问题现象 手动执行如下命令,出现如下报错日志。 sshp 22 oConnectTimeout10oStrictHostKeyCheckingnoteledb@10.218.14.144sudoyumyinstalldos2unixexpectreadlinecreatereponettoolslsofuuid 经过排查发现目录文件权限不对,用户组不具备读写操作权限。 原因分析 执行umask命令,发现其设置的值与实际不相符,查找出位0027,实际上位022才对,导致用户创建的文件或者目录用户组权限不对。 解决方案 方式一: 1. 执行如下命令,给解压出的安装包赋予读写执行权限。 plaintext cd/app sudo chmod R 755 teledbxv2.8.6centos.x8664 sudo chown R teledb:teledb teledbxv2.8.6centos.x8664 sshp 22 oConnectTimeout10oStrictHostKeyCheckingnoteledb@10.218.14.144sudoyumy installdos2unixexpectreadlinecreatereponettoolslsofuuid 2. 重新install,当出现如下回显信息表示安装成功。 方式二: 您可以修改umask的值,您可执行chmod命令授权也可参考如下方式修改umask的值。 plaintext 1、临时修改umask的值 umask022 2、永久修改umask的值 vim/etc/profile if[ $UID gt199] &&["/usr/bin/idgn""/usr/bin/idun"];thenumask022 else umask022 fi vim/etc/bashrc if [ $UID gt199] &&["/usr/bin/idgn""/usr/bin/idun"];thenumask002 else umask022 fi source/etc/profile sourcevim/etc/bashrc 检查 umask
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V5.1.0版本产品文档
        安装部署手册
        常见问题
        创建的目录、文件权限不足
      • now()导致分区不能剪枝问题优化
        本文为您介绍now()导致分区不能剪枝问题优化案例。 now()函数是获取当前时间,当SQL语句中分区表时间传入now()时,由于SQL下推DN节点执行,优化器在CN节点生成执行计划时,无法进行分区剪枝,导致扫描了所有分区,导致SQL性能下降,SQL并行执行时会引起严重的分区表锁冲突。 针对此问题,建议传入具体值代替now(),或定义一个稳定函数代替now()。 以下是关于该场景的测试情况: 1. 准备测试数据: teledb create table ttimerange (f1 bigint, f2 timestamp ,f3 bigint) partition by range (f2) begin (timestamp without time zone '20210601 0:0:0') step (interval '1 month') partitions (12) distribute by shard(f1) to group defaultgroup; CREATE TABLE 2. 使用now()时SQL执行计划: 可以看到,SQL被下推到DN节点执行,优化器没有剪枝,扫了所有分区。 teledb explain select from ttimerange where f2 Append (cost0.00..0.00 rows0 width0) > Seq Scan on ttimerange (partition sequence: 0, name: ttimerangepart0) (cost0.00..2.17 rows30 width24) Filter: (f2 Seq Scan on ttimerange (partition sequence: 1, name: ttimerangepart1) (cost0.00..2.17 rows30 width24) Filter: (f2 Seq Scan on ttimerange (partition sequence: 2, name: ttimerangepart2) (cost0.00..2.17 rows30 width24) Filter: (f2 Seq Scan on ttimerange (partition sequence: 3, name: ttimerangepart3) (cost0.00..2.17 rows30 width24) Filter: (f2 Seq Scan on ttimerange (partition sequence: 4, name: ttimerangepart4) (cost0.00..2.17 rows30 width24) Filter: (f2 Seq Scan on ttimerange (partition sequence: 5, name: ttimerangepart5) (cost0.00..2.17 rows30 width24) Filter: (f2 Seq Scan on ttimerange (partition sequence: 6, name: ttimerangepart6) (cost0.00..2.17 rows30 width24) Filter: (f2 Seq Scan on ttimerange (partition sequence: 7, name: ttimerangepart7) (cost0.00..2.17 rows30 width24) Filter: (f2 Seq Scan on ttimerange (partition sequence: 8, name: ttimerangepart8) (cost0.00..2.17 rows30 width24) Filter: (f2 Seq Scan on ttimerange (partition sequence: 9, name: ttimerangepart9) (cost0.00..2.17 rows30 width24) Filter: (f2 Seq Scan on ttimerange (partition sequence: 10, name: ttimerangepart10) (cost0.00..2.17 rows30 width24) Filter: (f2 Seq Scan on ttimerange (partition sequence: 11, name: ttimerangepart11) (cost0.00..2.17 rows30 width24) Filter: (f2 < now()) (27 rows) 3. 自定义一个稳定函数 teledb
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品
        SQL开发最佳实践
        性能优化最佳实践
        SQL优化案例
        now()导致分区不能剪枝问题优化
      • 使用hint固定执行计划提高性能
        分类 格式 说明 扫描方法 SeqScan(table) 强制对指定表使用序列扫描。 TidScan(table) 强制对指定表使用TID扫描。 IndexScan(table[ index...]) 强制对指定表使用索引扫描,可以指定某个索引。 IndexOnlyScan(table[ index...]) 强制对指定表仅使用索引扫描,可以指定某个索引。 BitmapScan(table[ index...]) 强制对指定表使用位图扫描,可以指定某个索引。 IndexScanRegexp(table[ POSIX Regexp...]) 强制对指定表使用索引扫描或仅索引扫描或位图扫描。使用正则匹配。 IndexOnlyScanRegexp(table[ POSIX Regexp...]) BitmapScanRegexp(table[ POSIX Regexp...]) NoSeqScan(table) 对指定表禁止使用序列扫描。 NoTidScan(table) 对指定表禁止使用TID扫描。 NoIndexScan(table) 对指定表禁止使用索引扫描(包括仅索引扫描)。 NoIndexOnlyScan(table) 对指定表禁止使用仅索引扫描。 NoBitmapScan(table) 对指定表禁止使用位图扫描。 连接方法 NestLoop(table table[ table...]) 强制对指定表使用嵌套循环连接。 HashJoin(table table[ table...]) 强制对指定表使用哈希连接。 MergeJoin(table table[ table...]) 强制对指定表使用合并连接。 NoNestLoop(table table[ table...]) 对指定表禁止使用嵌套循环连接。 NoHashJoin(table table[ table...]) 对指定表禁止使用哈希连接。 NoMergeJoin(table table[ table...]) 对指定表禁止使用合并连接 连接顺序 Leading(table table[ table...]) 强制连接顺序。 Leading() 强制连接顺序和方向, 行号校正 Rows(table table[ table...] correction) 纠正由指定表组成的联接结果的行号。可用的校正方法有绝对值(#),加法(+ ),减法()和乘法( )。是函数strtod()可以读取的字符串。 并行查询配置 Parallel(table < of workers> [soft hard]) GUC Set(GUCparam value) 计划器运行时,设置GUC参数。
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品
        SQL开发最佳实践
        运维最佳实践
        使用hint固定执行计划提高性能
      • 修改定时任务的命令
        本页为您介绍修改定时任务的命令。 what(jobno bigint,what text):第一个参数是定时任务的jodid;第二个参数是任务的命令。 plaintext select dbmsjob.what(20002, 'select pgsleep(1)'); 修改jobid为20002的定时任务的命令 期望结果,查询dbmsjob.job表发现jobid为20002的定时任务的commande字段为'select pgsleep(1)'
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品
        开发手册
        定时任务
        修改定时任务的命令
      • 根据需要设置关联发生的节点
        set preferolap to off; SET teledb explain select teledb1. from teledb1,teledb2 where teledb1.f1teledb2.f1 ; QUERY PLAN Hash Join (cost29.80..186.32 rows3872 width40) Hash Cond: (teledb1.f1 teledb2.f1) > Remote Subquery Scan on all (dn001,dn002) (cost100.00..158.40 rows880 width40) > Seq Scan on teledb1 (cost0.00..18.80 rows880 width40) > Hash (cost126.72..126.72 rows880 width4) > Remote Subquery Scan on all (dn001,dn002) (cost100.00..126.72 rows880 width4) > Seq Scan on teledb2 (cost0.00..18.80 rows880 width4) (7 rows)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品
        SQL开发最佳实践
        性能优化最佳实践
        SQL优化最佳实践
        根据需要设置关联发生的节点
      • 1
      • ...
      • 256
      • 257
      • 258
      • 259
      • 260
      • ...
      • 319
      跳转至
      推荐热词
      天翼云运维管理审计系统天翼云云服务平台云服务备份云日志服务应用运维管理云手机云电脑天翼云云hbase数据库电信云大数据saas服务电信云大数据paas服务轻量型云主机天翼云客户服务电话应用编排服务天翼云云安全解决方案云服务总线CSB天翼云服务器配置天翼云联邦学习产品天翼云云安全天翼云企业上云解决方案天翼云产品天翼云视频云存储

      天翼云最新活动

      安全隔离版OpenClaw

      OpenClaw云服务器专属“龙虾“套餐低至1.5折起

      天翼云新春焕新季

      云主机开年特惠28.8元/年,0元秒杀等你来抢!

      云上钜惠

      爆款云主机全场特惠,2核4G只要1.8折起!

      中小企业服务商合作专区

      国家云助力中小企业腾飞,高额上云补贴重磅上线

      出海产品促销专区

      爆款云主机低至2折,高性价比,不限新老速来抢购!

      天翼云奖励推广计划

      加入成为云推官,推荐新用户注册下单得现金奖励

      产品推荐

      弹性云主机 ECS

      镜像服务 IMS

      弹性高性能计算 E-HPC

      天翼云CTyunOS系统

      训推服务

      AI Store

      知识库问答

      人脸比对

      车牌识别

      推荐文档

      加入会议

      手动切换主备实例

      云课堂 第一课:玩转天翼云安全组

      《计算机信息网络国际联网安全保护管理办法》(公安部第33号令)

      • 7*24小时售后
      • 无忧退款
      • 免费备案
      • 专家服务
      售前咨询热线
      400-810-9889转1
      关注天翼云
      • 旗舰店
      • 天翼云APP
      • 天翼云微信公众号
      服务与支持
      • 备案中心
      • 售前咨询
      • 智能客服
      • 自助服务
      • 工单管理
      • 客户公告
      • 涉诈举报
      账户管理
      • 管理中心
      • 订单管理
      • 余额管理
      • 发票管理
      • 充值汇款
      • 续费管理
      快速入口
      • 天翼云旗舰店
      • 文档中心
      • 最新活动
      • 免费试用
      • 信任中心
      • 天翼云学堂
      云网生态
      • 甄选商城
      • 渠道合作
      • 云市场合作
      了解天翼云
      • 关于天翼云
      • 天翼云APP
      • 服务案例
      • 新闻资讯
      • 联系我们
      热门产品
      • 云电脑
      • 弹性云主机
      • 云电脑政企版
      • 天翼云手机
      • 云数据库
      • 对象存储
      • 云硬盘
      • Web应用防火墙
      • 服务器安全卫士
      • CDN加速
      热门推荐
      • 云服务备份
      • 边缘安全加速平台
      • 全站加速
      • 安全加速
      • 云服务器
      • 云主机
      • 智能边缘云
      • 应用编排服务
      • 微服务引擎
      • 共享流量包
      更多推荐
      • web应用防火墙
      • 密钥管理
      • 等保咨询
      • 安全专区
      • 应用运维管理
      • 云日志服务
      • 文档数据库服务
      • 云搜索服务
      • 数据湖探索
      • 数据仓库服务
      友情链接
      • 中国电信集团
      • 天翼云国际站
      • 189邮箱
      • 天翼企业云盘
      • 天翼云盘
      ©2026 天翼云科技有限公司版权所有 增值电信业务经营许可证A2.B1.B2-20090001
      公司地址:北京市东城区青龙胡同甲1号、3号2幢2层205-32室
      • 用户协议
      • 隐私政策
      • 个人信息保护
      • 法律声明
      备案 京公网安备11010802043424号 京ICP备 2021034386号