云主机开年特惠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云生态大会
  • 天翼云中国行
天翼云
  • 活动
  • 息壤智算
  • 产品
  • 解决方案
  • 应用商城
  • 定价
  • 合作伙伴
  • 开发者
  • 支持与服务
  • 了解天翼云
      • 文档
      • 控制中心
      • 备案
      • 管理中心
      HBASE数据库_相关内容
      • 合并多个查询结果
        本文为您介绍合并多个查询结果的方法。 不过滤重复的记录。 plaintext teledb create table teledbpg1(id int, nickname varchar); CREATE TABLE teledb insert into teledbpg1 values(3, 'pg'),(5,'test'); COPY 2 teledb select from teledbpg union all select from teledbpg1; id nickname + 1 teledb 1 hello,pgxc 2 TELEDB 3 pg 4 5 test 3 pg (7 rows) 过滤重复的记录。 plaintext teledb select from teledbpg union select from teledbpg1; id nickname + 1 teledb 1 hello,pgxc 4 5 test 2 TELEDB 3 pg (6 rows) 每个子查询分布在合并结果中的使用。 plaintext teledb select from (select from teledbpg limit 2) as t union all select from (select from teledbpg1 limit 2) teledb ; id nickname + 1 teledb 1 hello,pgxc 5 test 3 pg (4 rows)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V2.0.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
        私有云产品历史版本
        V2.0.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
        私有云产品历史版本
        V2.0.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        数据排序
      • 表达式索引
        本文为您介绍如何管理表达式索引。 plaintext teledb create table tupper(id int,mc text); CREATE TABLE teledb create index tuppermc on tupper(mc); CREATE INDEX teledb insert into tupper select t,md5(t::text) from generateseries(1,10000) as t; INSERT 0 10000 teledb analyze tupper; ANALYZE teledb explain select from tupper where upper(mc)md5('1'); QUERY PLAN Remote Fast Query Execution (cost0.00..0.00 rows0 width0) Node/s: dn01, dn02 > Seq Scan on tupper (cost0.00..133.58 rows25 width37) Filter: (upper(mc) 'c4ca4238a0b923820dcc509a6f75849b'::text) (4 rows) teledb create index tuppermc on tupper(upper(mc)); ERROR: relation "tuppermc" already exists teledb create index tuppermc1 on tupper(upper(mc)); CREATE INDEX teledb explain select from tupper where upper(mc)md5('1'); QUERY PLAN Remote Fast Query Execution (cost0.00..0.00 rows0 width0) Node/s: dn01, dn02 > Bitmap Heap Scan on tupper (cost4.48..50.94 rows25 width37) Recheck Cond: (upper(mc) 'c4ca4238a0b923820dcc509a6f75849b'::text) > Bitmap Index Scan on tuppermc1 (cost0.00..4.47 rows25 width0) Index Cond: (upper(mc) 'c4ca4238a0b923820dcc509a6f75849b'::text) (6 rows)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V2.0.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        索引管理
        表达式索引
      • 删除数据表
        本文为您介绍如何删除数据表。 删除当前模式下的数据表。 plaintext teledb drop table t; DROP TABLE 删除某个模式下数据表。 plaintext teledb d+ t Table "public.t" Column Type Collation Nullable Default Storage Stats target Description +++++++ id integer plain mc text extended Distribute By: SHARD(id) Location Nodes: ALL DATANODES teledb d+ tas Table "public.tas" Column Type Collation Nullable Default Storage Stats target Description +++++++ id integer plain mc text extended Distribute By: SHARD(id) Location Nodes: ALL DATANODES teledb drop table public.test; DROP TABLE 删除数据表,不存在时不执行,不报错。 plaintext teledb drop table IF EXISTS t; NOTICE: table "t" does not exist, skipping DROP TABLE 使用CASCADE无条件删除数据表。 plaintext teledb create view shardview as select from testshard; CREATE VIEW teledb drop table testshard; ERROR: cannot drop table testshard because other objects depend on it DETAIL: view shardview depends on table testshard HINT: Use DROP ... CASCADE to drop the dependent objects too. teledb drop table testshard cascade; NOTICE: drop cascades to view shardview DROP TABLE
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V2.0.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
        私有云产品历史版本
        V2.0.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        数据表管理
        添加分区子表
      • 使用查询结果创建数据表
        本文为您介绍如何使用查询结果创建数据表。 plaintext teledb insert into t values(1,'teledb'); INSERT 0 1 teledb create table tas as select from t; INSERT 0 1 teledb select from tas; id mc + 1 teledb (1 row)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V2.0.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
        私有云产品历史版本
        V2.0.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        数据表管理
        使用 IF NOT EXISTS
      • 创建shard表
        本文为您介绍如何创建shard表。 不指定shard key 建表方式 不指定shard key 建表方法,系统默认使用第一个字段作为表的 shard key。 plaintext teledb create table test(id int, name varchar, birth date); CREATE TABLE teledb d+ test Table "public.test" Column Type Collation Nullable Default Storage Stats target Description +++++++ id integer plain name character varying extended birth timestamp(0) without time zone plain Distribute By: SHARD(id) Location Nodes: ALL DATANODES 分布键选择原则: 分布键只能选择一个字段。 如果有主键,则选择主键做分布键。 如果主键是复合字段组合,则选择字段值选择性多的字段做分布键。 也可以把复合字段拼接成一个新的字段来做分布键。 没有主键的可以使用UUID 来做分布键。 总之一定要让数据尽可能的分布得足够散。 指定shard key 建表方式 plaintext teledb create table testshard(id serial not null, name text) distribute by shard(name) to group defaultgroup; CREATE TABLE teledb d+ testshard Table "public.testshard" Column Type Collation Nullable Default Storage Stats target Description +++++++ id integer not null nextval('testshardidseq'::regclass) plain name text extended Distribute By: SHARD(name) Location Nodes: ALL DATANODES distribute by shard(x) 用于指定分布键,数据分布于那个节点就是根据这个字段值来计算分片。 to group xxx 用于指定存储组(每个存储组可以有多个节点)。 分布键字段值不能修改,字段长度不能修改,字段类型不能修改
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V2.0.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        数据表管理
        创建shard表
      • 存储组管理
        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
        私有云产品历史版本
        V2.0.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
        私有云产品历史版本
        V3.0.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        索引管理
        gist索引
      • 访问函数
        本文为您介绍如何通过SELECT语法访问函数。 plaintext teledb select md5(random()::text); md5 ed5b356234979a63efc6c4f6537c4853 (1 row)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V3.0.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        访问函数
      • 提交工单显示系统错误
        当提交工单显示系统错误时,您可以参考本文,查看问题现象、问题原因和解决方案。 问题现象 提交工单显示系统错误。 查看日志发现是sql插入有问题,instmanager的vip列插入失败。 原因分析 开通实例使用到了8个vip,给的varchar字符窜长度不够。 解决方案 执行如下命令增加vip列的varchar长度,将其修改为255。 plaintext usedcp descinstmanager altertableinstmanagermodifycolumnvipvarchar(255);
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V2.0.0版本产品文档
        安装部署手册
        常见问题
        提交工单显示系统错误
      • TeleDB管控服务安装部署
        该任务用于指导软件工程师安装部署teledb管控服务。 该任务用于指导软件工程师安装部署teledb管控服务。 前提条件 已初始化环境,包括创建teledb用户,挂载磁盘,并给于sudo权限。 操作步骤 本次安装以X86安装包为例: 1. 创建根目录提供给挂载盘/data使用,并给于sudo权限。 plaintext mkdir p /data mount /dev/vdb /data echo "UUID"blkid /dev/vdbcut d '"' f2" /data xfs defaults 0 0" sudo tee a /etc/fstab 2. 上传并解压安装包 plaintext cd /app 上传teledbdeployx86centos.zip和teledbxossxxxi.x8664.rpm至app目录下。 unzip teledbdeployx86centos.zip cd teledbdeployx86centos/teledbxmirror/pgxzm cp teledbxossxxxi.x8664.rpm 3. 安装dos2unix 执行如下命令 plaintext cd /app/teledbdeployx86centos/teledbxmirror/deploy/utils/ rpm ivh dos2unix6.0.34.el7.x8664.rpm 出现如下回显信息。 plaintext cd /app chmod R 755 teledbdeployx86centos chown R teledb:teledb /app 4. 修改配置文件role.info和ossinit.conf 执行如下命令修改role.info配置文件 plaintext su teledb cd /app/teledbdeployx86centos/teledbxmgr/conf vim role.info 您可按照如下模版修改配置文件内容: 需要修改的就是主机ip、ssh端口、ssh连接用户(teledb)、用户密码
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V2.0.0版本产品文档
        安装部署手册
        安装过程
        TeleDB管控服务安装部署
      • 删除数据表
        本文为您介绍如何删除数据表。 删除当前模式下的数据表。 plaintext teledb drop table t; DROP TABLE 删除某个模式下数据表。 plaintext teledb d+ t Table "public.t" Column Type Collation Nullable Default Storage Stats target Description +++++++ id integer plain mc text extended Distribute By: SHARD(id) Location Nodes: ALL DATANODES teledb d+ tas Table "public.tas" Column Type Collation Nullable Default Storage Stats target Description +++++++ id integer plain mc text extended Distribute By: SHARD(id) Location Nodes: ALL DATANODES teledb drop table public.test; DROP TABLE 删除数据表,不存在时不执行,不报错。 plaintext teledb drop table IF EXISTS t; NOTICE: table "t" does not exist, skipping DROP TABLE 使用CASCADE无条件删除数据表。 plaintext teledb create view shardview as select from testshard; CREATE VIEW teledb drop table testshard; ERROR: cannot drop table testshard because other objects depend on it DETAIL: view shardview depends on table testshard HINT: Use DROP ... CASCADE to drop the dependent objects too. teledb drop table testshard cascade; NOTICE: drop cascades to view shardview DROP TABLE
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V3.0.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        数据表管理
        删除数据表
      • 条件索引
        本文为您介绍如何使用条件索引。 plaintext teledb create table tsex(id int,sex text) ; CREATE TABLE teledb teledb create index tsexsexidx on tsex (sex); CREATE INDEX teledb insert into tsex select t,'男' from generateseries(1,1000000) as t; INSERT 0 1000000 teledb insert into tsex select t,'女' from generateseries(1,100) as t; INSERT 0 100 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 > Index Scan using tsexsexidx on tsex (cost0.42..9.30 rows50 width8) Index Cond: (sex '女'::text) (4 rows)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V3.0.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        索引管理
        条件索引
      • 提交工单显示主机cpu或者内存不足
        本文为您介绍提交工单显示主机cpu或者内存不足的问题现象、问题原因和解决方案。 问题现象 提交工单时提示主机资源不足。 原因分析 通过查看错误日志发现需要的主机资源远超主机本身规格,实例主机规格是(96C256G),内存不够。 但是统计发现实例主机使用的资源是192G,与dcp计算的相差甚大。 解决方案 调整配置库的cgroupcluster表数据,降低比例。 plaintext usedcp selectoversaleratefromcgroupcluster updatecgroupclustersetoversalerate200;
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V3.0.0版本产品文档
        安装部署手册
        常见问题
        提交工单显示主机cpu或者内存不足
      • 只查某个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
        私有云产品历史版本
        V3.0.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        只查某个DN的数据
      • 特殊应用
        本文为您介绍SELECT语法的特殊应用场景,例如多行变成单行和一列变成多行。 多行变成单行 plaintext teledb select arraytostring(array(select nickname from teledbpg1),','); arraytostring test,pg (1 row) 一列变成多行 plaintext teledb insert into teledbpg1 values(6, 'teledb, teledb1'); INSERT 0 1 teledb select regexpsplittotable((select nickname from teledbpg1 where id6 limit 1), ','); regexpsplittotable teledb teledb1 (2 rows)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V3.0.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
        私有云产品历史版本
        V3.0.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        多表关联
      • 聚合函数并发计算
        本文介绍如何在使用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
        私有云产品历史版本
        V3.0.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        聚合函数并发计算
      • 聚集查询
        本文介绍如何在使用SELECT语法时进行聚集查询,例如统计记录数、不重复值的记录表,以及求和等。 统计记录数。 plaintext teledb select count(1) from teledbpg; count 5 (1 row) 统计不重复值的记录表。 plaintext teledb select count(distinct id) from teledbpg; count 4 (1 row) 求和。 plaintext teledb select sum(id) from teledbpg; sum 11 (1 row) 求最大值。 plaintext teledb select max(id) from teledbpg; max 4 (1 row) 求最小值。 plaintext teledb select min(id) from teledbpg; min 1 (1 row) 求平均值。 plaintext teledb select avg(id) from teledbpg; avg 2.2000000000000000 (1 row)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V3.0.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        聚集查询
      • 自定义复合类型
        本文为您介绍如何增加一个复合类型。 增加一个复合类型 plaintext teledb create type mytype as (f1 int,f2 varchar(10)); CREATE TYPE
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V3.0.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        自定义复合类型
      • gin索引
        explain select from ginmul where f12 and f3'20190218 16:59:52.872523'; QUERY PLAN Remote Fast Query Execution (cost0.00..0.00 rows0 width0) Node/s: dn01 > Bitmap Heap Scan on ginmul (cost36.00..40.02 rows1 width90) Recheck Cond: ((f1 2) AND (f3 '20190218 16:59:52.872523'::timestamp without time zone)) > Bitmap Index Scan on ginmulginidx (cost0.00..36.00 rows1 width0) Index Cond: ((f1 2) AND (f3 '20190218 16:59:52.872523'::timestamp without time zone)) (6 rows) 三字段组合索引 plaintext teledb explain select from ginmul where f12 and f3'20190218 16:59:52.872523' and f6'fa627dc16c2bd026150afa0453a0991d'; QUERY PLAN Remote Fast Query Execution (cost0.00..0.00 rows0 width0) Node/s: dn01 > Bitmap Heap Scan on ginmul (cost52.00..56.02 rows1 width90) Recheck Cond: ((f1 2) AND (f3 '20190218 16:59:52.872523'::timestamp without time zone) AND (f6 'fa627dc16c2bd026150afa0453a0991d'::text)) > Bitmap Index Scan on ginmulginidx (cost0.00..52.00 rows1 width0) Index Cond: ((f1 2) AND (f3 '20190218 16:59:52.872523'::timestamp without time zone) AND (f6 'fa627dc16c2bd026150afa0453a0991d'::text)) (6 rows)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V3.0.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        索引管理
        gin索引
      • 表达式索引
        本文为您介绍如何管理表达式索引。 plaintext teledb create table tupper(id int,mc text); CREATE TABLE teledb create index tuppermc on tupper(mc); CREATE INDEX teledb insert into tupper select t,md5(t::text) from generateseries(1,10000) as t; INSERT 0 10000 teledb analyze tupper; ANALYZE teledb explain select from tupper where upper(mc)md5('1'); QUERY PLAN Remote Fast Query Execution (cost0.00..0.00 rows0 width0) Node/s: dn01, dn02 > Seq Scan on tupper (cost0.00..133.58 rows25 width37) Filter: (upper(mc) 'c4ca4238a0b923820dcc509a6f75849b'::text) (4 rows) teledb create index tuppermc on tupper(upper(mc)); ERROR: relation "tuppermc" already exists teledb create index tuppermc1 on tupper(upper(mc)); CREATE INDEX teledb explain select from tupper where upper(mc)md5('1'); QUERY PLAN Remote Fast Query Execution (cost0.00..0.00 rows0 width0) Node/s: dn01, dn02 > Bitmap Heap Scan on tupper (cost4.48..50.94 rows25 width37) Recheck Cond: (upper(mc) 'c4ca4238a0b923820dcc509a6f75849b'::text) > Bitmap Index Scan on tuppermc1 (cost0.00..4.47 rows25 width0) Index Cond: (upper(mc) 'c4ca4238a0b923820dcc509a6f75849b'::text) (6 rows)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V3.0.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        索引管理
        表达式索引
      • 使用IF NOT EXITS
        本页为您介绍如何使用使用 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
        私有云产品历史版本
        V3.0.0版本产品文档
        开发手册
        数据库基础开发
        DDL操作
        数据表管理
        使用IF NOT EXITS
      • 添加主机时,硬件联通及测试主机失败
        添加主机时,如果硬件联通及测试主机失败,则您需要添加安全组,放通监控插件端口。 问题现象 添加主机时,测试连通及硬件检测失败。 原因分析 监控插件端口未放通。 解决方案 添加安全组,放通端口。出现如下图所示,则表示执行成功。
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V3.0.0版本产品文档
        安装部署手册
        常见问题
        添加主机时,硬件联通及测试主机失败
      • 开通实例的teledb版本信息不对
        当导入的teledb内核版本与实例开通的版本选择不一致时,您可以参考本文查看问题现象、问题原因和解决方案。 问题现象 导入的teledb内核版本与实例开通的版本选择不一致。 原因分析 导入配置库的sql语句数据错误,dcp的README.md文件是6.11版本的规格。 解决方案 修改dcp库的prodtemplate表数据。 plaintext mysql>usedcp mysql> select id ,prodversion from prodtemplate; ++ id prodversion ++ 8 5.7 9 6.11 10 6.11 ++ 3 rows in set (0.00 sec) mysql> update prodtemplate set prodversion'6.13' where id9; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> update prodtemplate set prodversion'6.13' where id10; Query OK, 1 row affected (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> select id ,prodversion from prodtemplate; ++ id prodversion ++ 8 5.7 9 6.13 10 6.13 ++ 3 rows in set (0.00 sec)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V3.0.0版本产品文档
        安装部署手册
        常见问题
        开通实例的teledb版本信息不对
      • 聚合函数并发计算
        本文介绍如何在使用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
        私有云产品历史版本
        V4.0.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        聚合函数并发计算
      • 特殊应用
        本文为您介绍SELECT语法的特殊应用场景,例如多行变成单行和一列变成多行。 多行变成单行 plaintext teledb select arraytostring(array(select nickname from teledbpg1),','); arraytostring test,pg (1 row) 一列变成多行 plaintext teledb insert into teledbpg1 values(6, 'teledb, teledb1'); INSERT 0 1 teledb select regexpsplittotable((select nickname from teledbpg1 where id6 limit 1), ','); regexpsplittotable teledb teledb1 (2 rows)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V4.0.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        特殊应用
      • 访问函数
        本文为您介绍如何通过SELECT语法访问函数。 访问函数 plaintext teledb select md5(random()::text); md5 ed5b356234979a63efc6c4f6537c4853 (1 row)
        来自:
        帮助文档
        分布式融合数据库HTAP
        私有云产品历史版本
        V4.0.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
        私有云产品历史版本
        V4.0.0版本产品文档
        开发手册
        数据库基础开发
        DML操作
        SELECT语法
        数据排序
      • 1
      • ...
      • 177
      • 178
      • 179
      • 180
      • 181
      • ...
      • 183
      跳转至
      推荐热词
      天翼云运维管理审计系统天翼云云服务平台云服务备份云日志服务应用运维管理云手机云电脑天翼云云hbase数据库电信云大数据saas服务电信云大数据paas服务轻量型云主机天翼云客户服务电话应用编排服务天翼云云安全解决方案云服务总线CSB天翼云服务器配置天翼云联邦学习产品天翼云云安全天翼云企业上云解决方案天翼云产品天翼云视频云存储

      天翼云最新活动

      安全隔离版OpenClaw

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

      天翼云新春焕新季

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

      云上钜惠

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

      中小企业服务商合作专区

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

      出海产品促销专区

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

      天翼云奖励推广计划

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

      产品推荐

      弹性云主机 ECS

      物理机 DPS

      多活容灾服务

      镜像服务 IMS

      轻量型云主机

      弹性伸缩服务 AS

      天翼云CTyunOS系统

      训推服务

      公共算力服务

      推荐文档

      创建阈值规则

      慢查询日志

      如何退换发票?

      产品变更

      • 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号