日期:2014-05-16 浏览次数:20589 次
????? 为验证分区表对检索数据的性能的提升,今天做了100W条数据级的检索和插入的测试。
?
?测试环境:
1. 操作系统和硬件:windows-XP,CPU3.2 双核,3G内存,硬盘500G左右。
2. 软件环境:hibernate3,structs1,ORACLE 10.2 ,weblogic10,JDK6.0
?
测试表:
1.无分区表test
create table TEST ( STI_ID NUMBER(10) not null, STI_STUDENT NUMBER(19), STI_STUDENT_NAME VARCHAR2(20), STI_STUDENT_CARD_ID CHAR(14) not null, STI_STUDENT_CARD_PRINT_NUM VARCHAR2(20), STI_COACH NUMBER(19), STI_COACH_NAME VARCHAR2(20), STI_COACH_CARD_ID CHAR(14) not null, STI_COACH_CARD_PRINT_NUM VARCHAR2(20), STI_SCHOOL NUMBER(10), STI_SCHOOL_NAME VARCHAR2(50), STI_SCHOOL_SHORT_NAME VARCHAR2(20), STI_COUNTY CHAR(6), STI_COUNTY_NAME VARCHAR2(20), STI_TRAIN_START_TIME DATE not null, STI_TRAIN_END_TIME DATE not null, STI_TOTAL_TIME NUMBER(5) default 0, STI_TOTAL_MILEAGE NUMBER(11,1) default 0, STI_TOTAL_MONEY NUMBER(7,2) default 0, STI_IS_SIGN_OUT NUMBER(3) not null, STI_APPLY_EXAM_SUBJECT NUMBER(3), STI_TRAIN_SUBJECT NUMBER(3) not null, STI_TRAIN_SUBJECT_NAME VARCHAR2(50), STI_TERMINAL_MACHINE CHAR(14) not null, STI_TERMINAL_PRINT_NUM VARCHAR2(20), STI_UP_TIME DATE default sysdate not null, STI_TERMINAL_DATA_ID VARCHAR2(20), STI_IS_SYNCHRONIZE NUMBER(3) default 0, IS_UP CHAR(1) default 0, UP_TIME DATE, UP_COUNT NUMBER(3) default 0, CS_INNER_NUM NUMBER(10), CS_NAME VARCHAR2(50), STI_TRAIN_PRICE NUMBER(5), IS_COUNT NUMBER(1) default 0, IS_COUNT_TIME DATE, STI_IS_TO_WEB NUMBER(1) default 0 )
?
2.按sti_school分区的表test1
create table TEST1 ( STI_ID NUMBER(10) not null, STI_STUDENT NUMBER(19), STI_STUDENT_NAME VARCHAR2(20), STI_STUDENT_CARD_ID CHAR(14) not null, STI_STUDENT_CARD_PRINT_NUM VARCHAR2(20), STI_COACH NUMBER(19), STI_COACH_NAME VARCHAR2(20), STI_COACH_CARD_ID CHAR(14) not null, STI_COACH_CARD_PRINT_NUM VARCHAR2(20), STI_SCHOOL NUMBER(10), STI_SCHOOL_NAME VARCHAR2(50), STI_SCHOOL_SHORT_NAME VARCHAR2(20), STI_COUNTY CHAR(6), STI_COUNTY_NAME VARCHAR2(20), STI_TRAIN_START_TIME DATE not null, STI_TRAIN_END_TIME DATE not null, STI_TOTAL_TIME NUMBER(5) default 0, STI_TOTAL_MILEAGE NUMBER(11,1) default 0, STI_TOTAL_MONEY NUMBER(7,2) default 0, STI_IS_SIGN_OUT NUMBER(3) not null, STI_APPLY_EXAM_SUBJECT NUMBER(3), STI_TRAIN_SUBJECT NUMBER(3) not null, STI_TRAIN_SUBJECT_NAME VARCHAR2(50), STI_TERMINAL_MACHINE CHAR(14) not null, STI_TERMINAL_PRINT_NUM VARCHAR2(20), STI_UP_TIME DATE default sysdate not null, STI_TERMINAL_DATA_ID VARCHAR2(20), STI_IS_SYNCHRONIZE NUMBER(3) default 0, IS_UP CHAR(1) default 0, UP_TIME DATE, UP_COUNT NUMBER(3) default 0, CS_INNER_NUM NUMBER(10), CS_NAME VARCHAR2(50), STI_TRAIN_PRICE NUMBER(5), IS_COUNT NUMBER(1) default 0, IS_COUNT_TIME DATE, STI_IS_TO_WEB NUMBER(1) default 0 ) partition by range (sti_school) ( partition cus_part1 values less than (33030082) , partition cus_part2 values less than (33030122), partition cus_part3 value