重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
123
返回列表 发新帖
楼主: 郑全
打印 上一主题 下一主题

PG和ORACLE 对比

[复制链接]
21#
 楼主| 发表于 2024-1-1 13:20:19 | 只看该作者
21.优化连接
    ORACLE: NESTED LOOP,HASH JOIN ,MERGE JOIN,CROSS JOIN

    PG: NESTED LOOP,HASH JOIN ,MERGE JOIN
          没有 CROSS JOIN
回复 支持 反对

使用道具 举报

22#
 楼主| 发表于 2024-1-1 15:59:29 | 只看该作者
22.在同一字段上能否创建多个索引

    ORACLE:不能

    PG : 可以创建多个不同的索引,而且多个可以有用
            postgres@:5432/postgres-95655#=create index idx_test on test(id);
CREATE INDEX
postgres@:5432/postgres-95655#=create index idx_test1 on test(id);
CREATE INDEX
postgres@:5432/postgres-95655#=create index idx_test2 on test(id);
CREATE INDEX
postgres@:5432/postgres-95655#=\d test
                Table "public.test"
Column |  Type   | Collation | Nullable | Default
--------+---------+-----------+----------+---------
id     | integer |           |          |
v      | integer |           |          |
Indexes:
    "idx_test" btree (id)
    "idx_test1" btree (id)
    "idx_test2" btree (id)
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-4-28 18:42 , Processed in 0.103408 second(s), 16 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表