当前位置:Gxlcms > 数据库问题 > oracle笔记--DML语句优化

oracle笔记--DML语句优化

时间:2021-07-01 10:21:17 帮助过:30人阅读

  1. 直接删除整个分区
  2. 使用逻辑删除
  • 更新
    update table A a
    set a.c1 = (select b.c1 from B b where a.id = b.id)
    where exists(select 1 from B b where a.id = b.id )

    可以考虑使用以下方式来更新表中的数据避免对B的两次查询

    update (select a.c1 a_c1, b.c1 b_c1 from A a, B where a.id = b.id)
    set a_c1 = b_c1

     

  •    

        

    oracle笔记--DML语句优化

    标签:table   where   默认   删除   end   logs   io子系统   避免   run   

    人气教程排行