• oracle 读书笔记


    1 动态sql即拼接字符串的sql,使用变量代替具体值,10万条语句可以被hash陈一个SQL_ID,可以只解析一次
    for i in 1..100000
    loop
    execute immediate
    'insert into t values(:x)' using i;
    end loop;
    commit;
    commit是对log及事物的操作,不是写数据的动作,写数据是由CKPT进程决定的

    2 create table跳过数据缓存区,直接写入磁盘,适合海量迁移
    insert into t select rownum x from dual connect by level<=10000000;
    create table t as select rownum x from dual connect by level<=10000000;

    3 create table t nologging parallel 64 as select rownum x from dual connect by level<=10000000;

    4 全局临时表
    --session关闭数据自动删除
    create global temporary table temp_session on commit preserve rows as select * from dba_objects where 1=2
    --事务提交,数据自动删除
    create global temporary table temp_ransaction on commit delete rows as select * from dba_objects where 1=2

    5 强制走索引
    select /*+index(col_name)*/ col_name from t;

    6 连接方式
    select * from omorder o,customer c where o.customerno=c.customerid

    强制使用嵌套循环连接方式

    select /*+leading(o) use_nl(c)*/* from omorder o,customer c where o.customerno=c.customerid
    强制使用hash连接方式
    select /*+leading(o) use_hash(c)*/* from omorder o,customer c where o.customerno=c.customerid

    insert /*+ append */ into temp_tb 
    select /*+ parallel(tt,4) */ customerno from  tt

    http://www.oracle.com/technetwork/java/javase/downloads/index.html
  • 相关阅读:
    django-rest-framework 注意事项
    Python virtualenv 使用总结篇
    python flask 基础入门
    python property
    python Numpy
    c语言学习的第四天2
    c语言学习第四天数据类型1
    学习c编程的第三天
    学习c编程的第二天
    HTTP首部及各状态码
  • 原文地址:https://www.cnblogs.com/ai464068163/p/4292924.html
Copyright © 2020-2023  润新知