输入banner图图片脚本导航/分类

oracle笔记--DML语句优化

  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