TPCC test for Oracle

Source: Internet
Author: User

According to the test instance of Mr Jonathan Lewis, The TPCC test of Oracle found that the sort function of the cluster exists completely for the tpcc test. Non-equivalent query statements all follow the wrong plan, get the wrong result. This oracle is too troublesome...

[sql] execute dbms_random.seed(0)    create cluster sorted_hash_cluster (      hash_value  number(6,0),      sort_value  varchar2(2) sort  )  size 300  hashkeys 100  ;    create table sorted_hash_table (      hash_value  number(6,0),      sort_value  varchar2(2),      v1      varchar2(10),      padding     varchar2(30)  )  cluster sorted_hash_cluster (      hash_value, sort_value  )  ;      begin      for i in 1..5000 loop          insert into sorted_hash_table values(              trunc(dbms_random.value(0,99)),              dbms_random.string('U',2),              lpad(i,10),              rpad('x',30,'x')          );          commit;      end loop;  end;  /    begin      dbms_stats.gather_table_stats(          ownname      => user,          tabname      =>'sorted_hash_table'      );  end;  /    select count(*) from sorted_hash_table where hash_value = 92;  select count(*) from sorted_hash_table where hash_value = 92 and sort_value is null;  select count(*) from sorted_hash_table where hash_value = 92 and sort_value is not null;    select * from sorted_hash_table where hash_value = 92 and sort_value >= 'YR';  select * from sorted_hash_table where hash_value = 92 and sort_value > 'YR';  

 


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.