zoukankan      html  css  js  c++  java
  • 20190627 pl/sql优化意识

    1. 大数据表中如何清除数据提高性能?

    delete from tablename where 条件 ,条件也许是索引会快一些,但是逐行删除怎么都快不起来

    改为truncate table  ,大的数据表改造为分区表,根据分区进行truncate 比较好 (这是基于你不太好直接trancate 全表的时候)

    2.大数据主表inner join 中间数据限制表 和Exist 效能?

    两个表已经进行了inner 那么第三个表,你是 

    select t1.*,t2.*  from tabel1 t1,tabel2 t2,table3 t3  ...

    还是

    select t1,*,t2* from table1 t1,table2 t2 

    where exist   table3 ...

    这里使用Exist 主要是因为Select不从t3取数据,只是为了限制范围,也不需要去inner,

    那么在运行中exist的比对方式跟inner的区别在何处?

    (语句我没写全,只是记录一些思考比较)

    也许并不是你需要的内容,这只是我人生的一些痕迹. -- soar.pang
  • 相关阅读:
    spring_three
    报错:java.sql.SQLException: The server
    Spring_two
    Spring_One
    Mybatis中的collection和association一关系
    Mybatis_three
    文件操作1
    面向对象编程三大特征7
    面向对象编程三大特征6
    面向对象编程三大特征5
  • 原文地址:https://www.cnblogs.com/Soar-Pang/p/11095890.html
Copyright © 2011-2022 走看看