当前位置: 首页 > news >正文

lightdb UPDATE INDEXES自动分区转换支持全大写索引名

文章目录

  • 背景
  • 示例

背景

普通表转分区表,Oracle中的写法习惯索引名会使用大写并用双引号包起来。这导致LightDB 在匹配索引名时提示索引名不存在。

LightDB 23.3.02增量版本对此进行了支持。

示例

准备环境

create database test_oracle with lightdb_syntax_compatible_type  oracle;
\c test_oracle

创建一张普通表

create table tb_list1
(city_id integer not null,city_name varchar2(30) not null,city_state varchar2(20) not null,city_amount integer not null
);

创建索引

create index TB_LIST_I01 on tb_list1(city_amount);
create index TB_LIST_I02 on tb_list1(city_name);

将普通表转为分区表

alter table tb_list1 MODIFY partition by range(city_amount)(partition tb_list1_amount1 values less than (101),partition tb_list1_amount2 values less than (105)) ONLINE UPDATE INDEXES("TB_LIST_I01" global,"TB_LIST_I02" local);

在LightDB 23.03.02之前的版本会提示索引找不到,原因是创建索引时没有带引号,而ALTER时携带了引号。

查看表信息

lightdb@test_oracle=# \d+ tb_list1Partitioned table "public.tb_list1"Column    |     Type     | Collation | Nullable | Default | Storage  | Stats target | Description 
-------------+--------------+-----------+----------+---------+----------+--------------+-------------city_id     | integer      |           | not null |         | plain    |              | city_name   | varchar2(30) |           | not null |         | extended |              | city_state  | varchar2(20) |           | not null |         | extended |              | city_amount | integer      |           | not null |         | plain    |              | 
Partition key: RANGE (city_amount)
Indexes:"tb_list_i01" btree (city_amount)"tb_list_i02" btree (city_name)
Partitions: "tb_list1$p$tb_list1_amount1" FOR VALUES FROM (MINVALUE) TO (101),"tb_list1$p$tb_list1_amount2" FOR VALUES FROM (101) TO (105)
http://www.lryc.cn/news/222162.html

相关文章:

  • Vue路由重定向
  • MTK_ISP模块调试总结
  • Kotlin基本语法
  • macos端串口调试推荐 serial直装激活 for mac
  • MapReduce WordCount程序实践(IDEA版)
  • go程序获取工作目录及可执行程序存放目录的方法-linux
  • 数据中台之数据建模工程实操
  • 三国志14信息查询小程序(历史武将信息一览)制作更新过程06-复现小程序
  • 《研发效能(DevOps)工程师》课程简介(五)丨IDCF
  • Jupyter Notebook快速上手
  • 三款软件录制电脑屏幕视频
  • react fiber架构【详细讲解,看这一篇就够了】
  • 竞赛 深度学习疲劳检测 驾驶行为检测 - python opencv cnn
  • 国风数字人:数字时代的传统戏剧文化代言人
  • 腾讯广告RACE曝光归因模型
  • 使用python将word转pdf
  • Python装饰器的艺术
  • [答疑]校长出轨主任流程的业务建模
  • 【网络管理——操作系统与安全】
  • 62、使用python进行rk3588开发板进行推流亚马逊云服务上,进行实时播放
  • Microsoft Dynamics 365 CE 扩展定制 - 7. 安全
  • Linux - 进程程序替换 - C/C++ 如何实现与各个语言之间的相互调用 - 替换环境变量
  • react-native 0.63 适配 Xcode 15 iOS 17.0+
  • 易点易动设备管理系统:提升设备巡检和维修效率,延长设备使用寿命的利器
  • Vue3:解决基地址不同 数据交互http与https跨域问题
  • chatgpt升级啦,训练数据时间更新到2023年4月,支持tools(升级functionCall),128k上下文
  • 各种格式文件预览
  • 21款奔驰GLE350升级迈巴赫电动踏板 上下车更加方便
  • 【Android】Lombok for Android Studio 离线插件
  • 在Docker中设置Redis的密码