兼容性判定
公开资料依据 · 建议 PoC 复核支持度partial
严重度major
置信度medium
依据规则my.index.type_clause
怎么改
按用途改为 CREATE INDEX ... USING btree/hash/gist/gin
判定说明
具备多种访问方法,但 USING 的位置、支持的操作符与 MySQL HASH/BTREE/RTREE 契约不同;建议 PoC 复核计划
库侧 / 应用侧路径
库侧改造
可行:按等值/范围/空间用途选择目标索引类型
应用侧改造
不可行:索引访问方法属于数据库设计
推荐路线:db_side。验证建议:执行计划、范围/等值查询、唯一性和空间查询性能回归
规则样例
CREATE INDEX idx_name USING BTREE ON customer(name)
CREATE TABLE t (k INT, KEY idx_k(k) USING HASH)
ALTER TABLE t ADD INDEX idx_k(k) USING HASH
参考来源
- https://www.postgresql.org/docs/16/sql-createindex.html
- https://www.postgresql.org/docs/16/indexes-types.html
- https://www.postgresql.org/docs/16/datatype.html
- https://www.postgresql.org/docs/16/functions.html
- https://www.postgresql.org/docs/16/sql-commands.html
- https://cloud.tencent.com/document/product/1376/126644
相关改造点
- MYSQL → postgresql 16 全部改造点
- postgresql 16 兼容性总览
- MYSQL 迁移国产库总览
- ORACLE ADD_MONTHS 函数 迁移 postgresql 16 怎么改
- ORACLE ALTER SESSION SET 会话参数 迁移 postgresql 16 怎么改
- ORACLE ANYDATA 动态类型列 迁移 postgresql 16 怎么改
- ORACLE ASCIISTR Unicode 转义函数 迁移 postgresql 16 怎么改
- ORACLE 关联数组(INDEX BY 表) 迁移 postgresql 16 怎么改
- ORACLE AT TIME ZONE 时区表达式 迁移 postgresql 16 怎么改