zoukankan      html  css  js  c++  java
  • Oracle数据库表分区

    1、特点:适用于海量数据

    2、实例:

    create tablespace tbl_sc
    datafile 'd:/sc.dbf' size 20M;

    create tablespace tbl_hn
    datafile 'd:/hn.dbf' size 20M;


    create table person
    (
           no number(11) primary key,
           name varchar2(30) not null,
           acode number(4)
          
    );
    partition by list(acode) (
              partition code_sc values(4) tablespace tbl_sc,
              partition code_hn values(5) tablespace tbl_hn
    );


    insert into person values(1,'aa',4);
    insert into person values(2,'bb',5);
    insert into person values(3,'dd',4);
    insert into person values(4,'cc',4);
    insert into person values(5,'ee',5);

    select * from person  where acode = 4;

    3、数据库缓存

    /*-----------------对库高速缓存的调整----------------*/

    /**------------------------------------------
    统计请求sum(pins)-------------------pins属性
    统计不命中数sum(reloads)------------reloads属性
    ---------------------------------------------*/

    select sum(pins) "请求数",sum(reloads)"不命中数" from v$librarycache;

    select (sum(pins-reloads))/sum(pins) "librarycache" from v$librarycache;


    /*-----------------对数据字典缓存的调整----------------*/

    /**------------------------------------------------
    统计请求sum(gets)--------------------------gets属性
    统计不命中数sum(getmisses)------------getmisses属性
    有效缓存项数------------------------------usage属性
    固定缓存----------------------------------fixed属性
    --------------------------------------------------*/

    select sum(gets) "请求数",sum(getmisses)"不命中数" from v$rowcache;

    select (sum(gets-getmisses-usage-fixed))/sum(gets) "数据字典使用率" from v$rowcache;

     

  • 相关阅读:
    day23 GUI
    day17JDK5.0新特性与正则表达式
    day12-day15集合
    day11线程
    day10-JavaAPI
    day09面向对象-
    day08面向对象-内部类、异常
    day06面向对象
    Idea导入Eclipse中的Maven Web(SSM)
    java给图片添加水印
  • 原文地址:https://www.cnblogs.com/boonya/p/2092222.html
Copyright © 2011-2022 走看看