mark some file to been opensource for ce-farm

This commit is contained in:
niyuhang
2023-11-15 11:44:43 +00:00
committed by ob-robot
parent 4900683cff
commit c8ace58297
685 changed files with 1080566 additions and 111051 deletions

View File

@ -0,0 +1,619 @@
alter system enable_table_without_all_cg = false;
create table t1(a int, b varchar(3048), primary key (a), c int) with column group for all columns, each column;
create table t2(pk int, c1 int, c2 int unsigned, c3 varchar(100)) block_size=2048 with column group for all columns, each column;
select count(*) from t1;
count(*)
150
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
150 150 1 299 22500 150 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 150 10 2990 225000
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
count(*) count(pk) min(pk) max(pk) sum(pk) min(c1) max(c1) sum(c1) min(c2) max(c2) sum(c2) min(c3) max(c3)
1500 1500 11 3000 2258250 11 3000 2258250 12 3001 2259750 abcdefg1 abcdefg99
alter system major freeze;
alter table t1 add column c1 int default 0, add column c2 varchar(100);
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*) from t1;
count(*)
250
select count(c1) from t1;
count(c1)
250
select count(c2) from t1;
count(c2)
100
select count(c1) from t1 where c1 > 300;
count(c1)
99
select count(c1) from t1 where c1 < 30;
count(c1)
150
select a, c2, count(c1) from t1 where c1 > 480;
a c2 count(c1)
482 482482482482482 9
select c1, c2 from t1 where c1 > 480 and a < 495;
c1 c2
482 482482482482482
484 484484484484484
486 486486486486486
488 488488488488488
490 490490490490490
492 492492492492492
494 494494494494494
select b, c2, count(c1) from t1 where c1 > 490 and a < 495;
b c2 count(c1)
49204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920 492492492492492 2
select a, c1, count(c1) from t1 where a <20 and c1 != 80 and c1 != 6 and c1 < 30;
a c1 count(c1)
1 0 10
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
select count(*) from t1;
count(*)
250
select count(c1) from t1;
count(c1)
250
select count(c2) from t1;
count(c2)
100
select count(c1) from t1 where c1 > 300;
count(c1)
99
select count(c1) from t1 where c1 < 30;
count(c1)
150
select a, c2, count(c1) from t1 where c1 > 480;
a c2 count(c1)
482 482482482482482 9
select c1, c2 from t1 where c1 > 480 and a < 495;
c1 c2
482 482482482482482
484 484484484484484
486 486486486486486
488 488488488488488
490 490490490490490
492 492492492492492
494 494494494494494
select b, c2, count(c1) from t1 where c1 > 490 and a < 495;
b c2 count(c1)
49204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920 492492492492492 2
select a, c1, count(c1) from t1 where a <20 and c1 != 80 and c1 != 6 and c1 < 30;
a c1 count(c1)
1 0 10
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*) from t1;
count(*)
250
select count(c1) from t1;
count(c1)
250
select count(c2) from t1;
count(c2)
100
select count(c1) from t1 where c1 > 300;
count(c1)
99
select count(c1) from t1 where c1 < 30;
count(c1)
150
select a, c2, count(c1) from t1 where c1 > 480;
a c2 count(c1)
482 482482482482482 9
select c1, c2 from t1 where c1 > 480 and a < 495;
c1 c2
482 482482482482482
484 484484484484484
486 486486486486486
488 488488488488488
490 490490490490490
492 492492492492492
494 494494494494494
select b, c2, count(c1) from t1 where c1 > 490 and a < 495;
b c2 count(c1)
49204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920 492492492492492 2
select a, c1, count(c1) from t1 where a <20 and c1 != 80 and c1 != 6 and c1 < 30;
a c1 count(c1)
1 0 10
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
select count(*) from t1;
count(*)
250
select count(c1) from t1;
count(c1)
250
select count(c2) from t1;
count(c2)
100
select count(c1) from t1 where c1 > 300;
count(c1)
99
select count(c1) from t1 where c1 < 30;
count(c1)
150
select a, c2, count(c1) from t1 where c1 > 480;
a c2 count(c1)
482 482482482482482 9
select c1, c2 from t1 where c1 > 480 and a < 495;
c1 c2
482 482482482482482
484 484484484484484
486 486486486486486
488 488488488488488
490 490490490490490
492 492492492492492
494 494494494494494
select b, c2, count(c1) from t1 where c1 > 490 and a < 495;
b c2 count(c1)
49204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920 492492492492492 2
select a, c1, count(c1) from t1 where a <20 and c1 != 80 and c1 != 6 and c1 < 30;
a c1 count(c1)
1 0 10
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
alter system major freeze;
alter table t2 add column c4 bigint default 10, add column c5 bigint unsigned default 20;
alter table t2 add column c6 bigint default null;
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
count(*) count(pk) min(pk) max(pk) sum(pk) min(c1) max(c1) sum(c1) min(c2) max(c2) sum(c2) min(c3) max(c3)
1500 1500 11 3000 2258250 11 3000 2258250 12 3001 2259750 abcdefg1 abcdefg99
select count(*),count(c4),count(c5),count(c6) from t2;
count(*) count(c4) count(c5) count(c6)
1500 1500 1500 0
select min(c4),min(c5),min(c6) from t2;
min(c4) min(c5) min(c6)
10 20 NULL
select max(c4),max(c5),max(c6) from t2;
max(c4) max(c5) max(c6)
10 20 NULL
select sum(c4),sum(c5),sum(c6) from t2;
sum(c4) sum(c5) sum(c6)
15000 30000 NULL
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
count(*) min(pk) max(c1) sum(c2) min(c3) max(c4) sum(c5) count(c6)
1500 11 3000 2259750 abcdefg1 10 30000 0
select count(*) from t1;
count(*)
250
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
count(*) count(pk) min(pk) max(pk) sum(pk) min(c1) max(c1) sum(c1) min(c2) max(c2) sum(c2) min(c3) max(c3)
1500 1500 11 3000 2258250 11 3000 2258250 12 3001 2259750 abcdefg1 abcdefg99
select count(*),count(c4),count(c5),count(c6) from t2;
count(*) count(c4) count(c5) count(c6)
1500 1500 1500 0
select min(c4),min(c5),min(c6) from t2;
min(c4) min(c5) min(c6)
10 20 NULL
select max(c4),max(c5),max(c6) from t2;
max(c4) max(c5) max(c6)
10 20 NULL
select sum(c4),sum(c5),sum(c6) from t2;
sum(c4) sum(c5) sum(c6)
15000 30000 NULL
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
count(*) min(pk) max(c1) sum(c2) min(c3) max(c4) sum(c5) count(c6)
1500 11 3000 2259750 abcdefg1 10 30000 0
select count(*) from t1;
count(*)
250
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
count(*) count(pk) min(pk) max(pk) sum(pk) min(c1) max(c1) sum(c1) min(c2) max(c2) sum(c2) min(c3) max(c3)
1500 1500 11 3000 2258250 11 3000 2258250 12 3001 2259750 abcdefg1 abcdefg99
select count(*),count(c4),count(c5),count(c6) from t2;
count(*) count(c4) count(c5) count(c6)
1500 1500 1500 0
select min(c4),min(c5),min(c6) from t2;
min(c4) min(c5) min(c6)
10 20 NULL
select max(c4),max(c5),max(c6) from t2;
max(c4) max(c5) max(c6)
10 20 NULL
select sum(c4),sum(c5),sum(c6) from t2;
sum(c4) sum(c5) sum(c6)
15000 30000 NULL
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
count(*) min(pk) max(c1) sum(c2) min(c3) max(c4) sum(c5) count(c6)
1500 11 3000 2259750 abcdefg1 10 30000 0
select count(*) from t1;
count(*)
250
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
count(*) count(pk) min(pk) max(pk) sum(pk) min(c1) max(c1) sum(c1) min(c2) max(c2) sum(c2) min(c3) max(c3)
1500 1500 11 3000 2258250 11 3000 2258250 12 3001 2259750 abcdefg1 abcdefg99
select count(*),count(c4),count(c5),count(c6) from t2;
count(*) count(c4) count(c5) count(c6)
1500 1500 1500 0
select min(c4),min(c5),min(c6) from t2;
min(c4) min(c5) min(c6)
10 20 NULL
select max(c4),max(c5),max(c6) from t2;
max(c4) max(c5) max(c6)
10 20 NULL
select sum(c4),sum(c5),sum(c6) from t2;
sum(c4) sum(c5) sum(c6)
15000 30000 NULL
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
count(*) min(pk) max(c1) sum(c2) min(c3) max(c4) sum(c5) count(c6)
1500 11 3000 2259750 abcdefg1 10 30000 0
select count(*) from t1;
count(*)
250
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
drop table t1,t2;
alter system enable_table_without_all_cg = true;
alter system flush plan cache;
create table t1(a int, b varchar(3048), primary key (a), c int) with column group for all columns, each column;
create table t2(pk int, c1 int, c2 int unsigned, c3 varchar(100)) block_size=2048 with column group for all columns, each column;
select count(*) from t1;
count(*)
150
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
150 150 1 299 22500 150 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 150 10 2990 225000
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
count(*) count(pk) min(pk) max(pk) sum(pk) min(c1) max(c1) sum(c1) min(c2) max(c2) sum(c2) min(c3) max(c3)
1500 1500 11 3000 2258250 11 3000 2258250 12 3001 2259750 abcdefg1 abcdefg99
alter system major freeze;
alter table t1 add column c1 int default 0, add column c2 varchar(100);
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*) from t1;
count(*)
250
select count(c1) from t1;
count(c1)
250
select count(c2) from t1;
count(c2)
100
select count(c1) from t1 where c1 > 300;
count(c1)
99
select count(c1) from t1 where c1 < 30;
count(c1)
150
select a, c2, count(c1) from t1 where c1 > 480;
a c2 count(c1)
482 482482482482482 9
select c1, c2 from t1 where c1 > 480 and a < 495;
c1 c2
482 482482482482482
484 484484484484484
486 486486486486486
488 488488488488488
490 490490490490490
492 492492492492492
494 494494494494494
select b, c2, count(c1) from t1 where c1 > 490 and a < 495;
b c2 count(c1)
49204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920 492492492492492 2
select a, c1, count(c1) from t1 where a <20 and c1 != 80 and c1 != 6 and c1 < 30;
a c1 count(c1)
1 0 10
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
select count(*) from t1;
count(*)
250
select count(c1) from t1;
count(c1)
250
select count(c2) from t1;
count(c2)
100
select count(c1) from t1 where c1 > 300;
count(c1)
99
select count(c1) from t1 where c1 < 30;
count(c1)
150
select a, c2, count(c1) from t1 where c1 > 480;
a c2 count(c1)
482 482482482482482 9
select c1, c2 from t1 where c1 > 480 and a < 495;
c1 c2
482 482482482482482
484 484484484484484
486 486486486486486
488 488488488488488
490 490490490490490
492 492492492492492
494 494494494494494
select b, c2, count(c1) from t1 where c1 > 490 and a < 495;
b c2 count(c1)
49204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920 492492492492492 2
select a, c1, count(c1) from t1 where a <20 and c1 != 80 and c1 != 6 and c1 < 30;
a c1 count(c1)
1 0 10
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*) from t1;
count(*)
250
select count(c1) from t1;
count(c1)
250
select count(c2) from t1;
count(c2)
100
select count(c1) from t1 where c1 > 300;
count(c1)
99
select count(c1) from t1 where c1 < 30;
count(c1)
150
select a, c2, count(c1) from t1 where c1 > 480;
a c2 count(c1)
482 482482482482482 9
select c1, c2 from t1 where c1 > 480 and a < 495;
c1 c2
482 482482482482482
484 484484484484484
486 486486486486486
488 488488488488488
490 490490490490490
492 492492492492492
494 494494494494494
select b, c2, count(c1) from t1 where c1 > 490 and a < 495;
b c2 count(c1)
49204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920492049204920 492492492492492 2
select a, c1, count(c1) from t1 where a <20 and c1 != 80 and c1 != 6 and c1 < 30;
a c1 count(c1)
1 0 10
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
alter system major freeze;
alter table t2 add column c4 bigint default 10, add column c5 bigint unsigned default 20;
alter table t2 add column c6 bigint default null;
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
count(*) count(pk) min(pk) max(pk) sum(pk) min(c1) max(c1) sum(c1) min(c2) max(c2) sum(c2) min(c3) max(c3)
1500 1500 11 3000 2258250 11 3000 2258250 12 3001 2259750 abcdefg1 abcdefg99
select count(*),count(c4),count(c5),count(c6) from t2;
count(*) count(c4) count(c5) count(c6)
1500 1500 1500 0
select min(c4),min(c5),min(c6) from t2;
min(c4) min(c5) min(c6)
10 20 NULL
select max(c4),max(c5),max(c6) from t2;
max(c4) max(c5) max(c6)
10 20 NULL
select sum(c4),sum(c5),sum(c6) from t2;
sum(c4) sum(c5) sum(c6)
15000 30000 NULL
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
count(*) min(pk) max(c1) sum(c2) min(c3) max(c4) sum(c5) count(c6)
1500 11 3000 2259750 abcdefg1 10 30000 0
select count(*) from t1;
count(*)
250
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
count(*) count(pk) min(pk) max(pk) sum(pk) min(c1) max(c1) sum(c1) min(c2) max(c2) sum(c2) min(c3) max(c3)
1500 1500 11 3000 2258250 11 3000 2258250 12 3001 2259750 abcdefg1 abcdefg99
select count(*),count(c4),count(c5),count(c6) from t2;
count(*) count(c4) count(c5) count(c6)
1500 1500 1500 0
select min(c4),min(c5),min(c6) from t2;
min(c4) min(c5) min(c6)
10 20 NULL
select max(c4),max(c5),max(c6) from t2;
max(c4) max(c5) max(c6)
10 20 NULL
select sum(c4),sum(c5),sum(c6) from t2;
sum(c4) sum(c5) sum(c6)
15000 30000 NULL
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
count(*) min(pk) max(c1) sum(c2) min(c3) max(c4) sum(c5) count(c6)
1500 11 3000 2259750 abcdefg1 10 30000 0
select count(*) from t1;
count(*)
250
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
count(*) count(pk) min(pk) max(pk) sum(pk) min(c1) max(c1) sum(c1) min(c2) max(c2) sum(c2) min(c3) max(c3)
1500 1500 11 3000 2258250 11 3000 2258250 12 3001 2259750 abcdefg1 abcdefg99
select count(*),count(c4),count(c5),count(c6) from t2;
count(*) count(c4) count(c5) count(c6)
1500 1500 1500 0
select min(c4),min(c5),min(c6) from t2;
min(c4) min(c5) min(c6)
10 20 NULL
select max(c4),max(c5),max(c6) from t2;
max(c4) max(c5) max(c6)
10 20 NULL
select sum(c4),sum(c5),sum(c6) from t2;
sum(c4) sum(c5) sum(c6)
15000 30000 NULL
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
count(*) min(pk) max(c1) sum(c2) min(c3) max(c4) sum(c5) count(c6)
1500 11 3000 2259750 abcdefg1 10 30000 0
select count(*) from t1;
count(*)
250
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
count(*) count(pk) min(pk) max(pk) sum(pk) min(c1) max(c1) sum(c1) min(c2) max(c2) sum(c2) min(c3) max(c3)
1500 1500 11 3000 2258250 11 3000 2258250 12 3001 2259750 abcdefg1 abcdefg99
select count(*),count(c4),count(c5),count(c6) from t2;
count(*) count(c4) count(c5) count(c6)
1500 1500 1500 0
select min(c4),min(c5),min(c6) from t2;
min(c4) min(c5) min(c6)
10 20 NULL
select max(c4),max(c5),max(c6) from t2;
max(c4) max(c5) max(c6)
10 20 NULL
select sum(c4),sum(c5),sum(c6) from t2;
sum(c4) sum(c5) sum(c6)
15000 30000 NULL
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
count(*) min(pk) max(c1) sum(c2) min(c3) max(c4) sum(c5) count(c6)
1500 11 3000 2259750 abcdefg1 10 30000 0
select count(*) from t1;
count(*)
250
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
count(*) count(a) min(a) max(a) sum(a) count(b) min(b) max(b) count(c) min(c) max(c) sum(c)
250 250 1 498 62400 250 1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990990 250 10 4980 624000
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
250 250 0 498 39900 100 300300300300300 498498498498498
drop table t1,t2;

View File

@ -0,0 +1,675 @@
drop table if exists ct1;
set session ob_trx_timeout=100000000000;
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group for all columns, each column;
alter system minor freeze;
alter system major freeze;
select c1, c2, c3, length(c4) from ct1 where c1 < 1;
c1 c2 c3 length(c4)
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c1 < 10;
c1 c2 c3 length(c4)
0 0 0 3200
1 1 1 3200
2 2 2 3200
3 3 3 3200
4 4 4 3200
5 5 5 3200
6 6 6 3200
7 7 7 3200
8 8 8 3200
9 9 9 3200
select c1, c2, c3, length(c4) from ct1 where c1 > 10000;
c1 c2 c3 length(c4)
select c1, c2, c3, length(c4) from ct1 where c2 < 1;
c1 c2 c3 length(c4)
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c2 < 10;
c1 c2 c3 length(c4)
0 0 0 3200
1 1 1 3200
2 2 2 3200
3 3 3 3200
4 4 4 3200
5 5 5 3200
6 6 6 3200
7 7 7 3200
8 8 8 3200
9 9 9 3200
select c1, c2, c3, length(c4) from ct1 where c2 > 10000;
c1 c2 c3 length(c4)
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 and c2 < 20;
c1 c2 c3 length(c4)
0 0 0 3200
1 1 1 3200
2 2 2 3200
3 3 3 3200
4 4 4 3200
5 5 5 3200
6 6 6 3200
7 7 7 3200
8 8 8 3200
9 9 9 3200
10 10 10 3200
11 11 11 3200
12 12 12 3200
13 13 13 3200
14 14 14 3200
15 15 15 3200
16 16 16 3200
17 17 17 3200
18 18 18 3200
19 19 19 3200
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 or c2 < 20;
c1 c2 c3 length(c4)
0 0 0 3200
1 1 1 3200
2 2 2 3200
3 3 3 3200
4 4 4 3200
5 5 5 3200
6 6 6 3200
7 7 7 3200
8 8 8 3200
9 9 9 3200
10 10 10 3200
11 11 11 3200
12 12 12 3200
13 13 13 3200
14 14 14 3200
15 15 15 3200
16 16 16 3200
17 17 17 3200
18 18 18 3200
19 19 19 3200
20 20 20 3200
21 21 21 3200
22 22 22 3200
23 23 23 3200
24 24 24 3200
25 25 25 3200
26 26 26 3200
27 27 27 3200
28 28 28 3200
29 29 29 3200
30 30 30 3200
31 31 31 3200
32 32 32 3200
33 33 33 3200
34 34 34 3200
35 35 35 3200
36 36 36 3200
37 37 37 3200
38 38 38 3200
39 39 39 3200
40 40 40 3200
41 41 41 3200
42 42 42 3200
43 43 43 3200
44 44 44 3200
45 45 45 3200
46 46 46 3200
47 47 47 3200
48 48 48 3200
49 49 49 3200
50 50 50 3200
select c1, c2, c3, length(c4) from ct1 where c1 < 1 order by c1 desc;
c1 c2 c3 length(c4)
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c1 < 10 order by c1 desc;
c1 c2 c3 length(c4)
9 9 9 3200
8 8 8 3200
7 7 7 3200
6 6 6 3200
5 5 5 3200
4 4 4 3200
3 3 3 3200
2 2 2 3200
1 1 1 3200
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c1 > 10000 order by c1 desc;
c1 c2 c3 length(c4)
select c1, c2, c3, length(c4) from ct1 where c2 < 1 order by c1 desc;
c1 c2 c3 length(c4)
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c2 < 10 order by c1 desc;
c1 c2 c3 length(c4)
9 9 9 3200
8 8 8 3200
7 7 7 3200
6 6 6 3200
5 5 5 3200
4 4 4 3200
3 3 3 3200
2 2 2 3200
1 1 1 3200
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c2 > 10000 order by c1 desc;
c1 c2 c3 length(c4)
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 and c2 < 20 order by c1 desc;
c1 c2 c3 length(c4)
19 19 19 3200
18 18 18 3200
17 17 17 3200
16 16 16 3200
15 15 15 3200
14 14 14 3200
13 13 13 3200
12 12 12 3200
11 11 11 3200
10 10 10 3200
9 9 9 3200
8 8 8 3200
7 7 7 3200
6 6 6 3200
5 5 5 3200
4 4 4 3200
3 3 3 3200
2 2 2 3200
1 1 1 3200
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 or c2 < 20 order by c1 desc;
c1 c2 c3 length(c4)
50 50 50 3200
49 49 49 3200
48 48 48 3200
47 47 47 3200
46 46 46 3200
45 45 45 3200
44 44 44 3200
43 43 43 3200
42 42 42 3200
41 41 41 3200
40 40 40 3200
39 39 39 3200
38 38 38 3200
37 37 37 3200
36 36 36 3200
35 35 35 3200
34 34 34 3200
33 33 33 3200
32 32 32 3200
31 31 31 3200
30 30 30 3200
29 29 29 3200
28 28 28 3200
27 27 27 3200
26 26 26 3200
25 25 25 3200
24 24 24 3200
23 23 23 3200
22 22 22 3200
21 21 21 3200
20 20 20 3200
19 19 19 3200
18 18 18 3200
17 17 17 3200
16 16 16 3200
15 15 15 3200
14 14 14 3200
13 13 13 3200
12 12 12 3200
11 11 11 3200
10 10 10 3200
9 9 9 3200
8 8 8 3200
7 7 7 3200
6 6 6 3200
5 5 5 3200
4 4 4 3200
3 3 3 3200
2 2 2 3200
1 1 1 3200
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c5 is null;
c1 c2 c3 length(c4)
select c1, c2, c3, length(c4), length(c5) from ct1 limit 20;
c1 c2 c3 length(c4) length(c5)
0 0 0 3200 3200
1 1 1 3200 3200
2 2 2 3200 3200
3 3 3 3200 3200
4 4 4 3200 3200
5 5 5 3200 3200
6 6 6 3200 3200
7 7 7 3200 3200
8 8 8 3200 3200
9 9 9 3200 3200
10 10 10 3200 3200
11 11 11 3200 3200
12 12 12 3200 3200
13 13 13 3200 3200
14 14 14 3200 3200
15 15 15 3200 3200
16 16 16 3200 3200
17 17 17 3200 3200
18 18 18 3200 3200
19 19 19 3200 3200
select c1, c2, c3, length(c4), length(c5) from ct1 limit 20 offset 5000;
c1 c2 c3 length(c4) length(c5)
5000 5000 5000 3200 3200
5001 5001 5001 3200 3200
5002 5002 5002 3200 3200
5003 5003 5003 3200 3200
5004 5004 5004 3200 3200
5005 5005 5005 3200 3200
5006 5006 5006 3200 3200
5007 5007 5007 3200 3200
5008 5008 5008 3200 3200
5009 5009 5009 3200 3200
5010 5010 5010 3200 3200
5011 5011 5011 3200 3200
5012 5012 5012 3200 3200
5013 5013 5013 3200 3200
5014 5014 5014 3200 3200
5015 5015 5015 3200 3200
5016 5016 5016 3200 3200
5017 5017 5017 3200 3200
5018 5018 5018 3200 3200
5019 5019 5019 3200 3200
select c1, c2, c3, length(c4), length(c5) from ct1 order by c1 desc limit 20;
c1 c2 c3 length(c4) length(c5)
9999 9999 9999 3200 3200
9998 9998 9998 3200 3200
9997 9997 9997 3200 3200
9996 9996 9996 3200 3200
9995 9995 9995 3200 3200
9994 9994 9994 3200 3200
9993 9993 9993 3200 3200
9992 9992 9992 3200 3200
9991 9991 9991 3200 3200
9990 9990 9990 3200 3200
9989 9989 9989 3200 3200
9988 9988 9988 3200 3200
9987 9987 9987 3200 3200
9986 9986 9986 3200 3200
9985 9985 9985 3200 3200
9984 9984 9984 3200 3200
9983 9983 9983 3200 3200
9982 9982 9982 3200 3200
9981 9981 9981 3200 3200
9980 9980 9980 3200 3200
select c1, c2, c3, length(c4), length(c5) from ct1 order by c1 desc limit 20 offset 5000;
c1 c2 c3 length(c4) length(c5)
4999 4999 4999 3200 3200
4998 4998 4998 3200 3200
4997 4997 4997 3200 3200
4996 4996 4996 3200 3200
4995 4995 4995 3200 3200
4994 4994 4994 3200 3200
4993 4993 4993 3200 3200
4992 4992 4992 3200 3200
4991 4991 4991 3200 3200
4990 4990 4990 3200 3200
4989 4989 4989 3200 3200
4988 4988 4988 3200 3200
4987 4987 4987 3200 3200
4986 4986 4986 3200 3200
4985 4985 4985 3200 3200
4984 4984 4984 3200 3200
4983 4983 4983 3200 3200
4982 4982 4982 3200 3200
4981 4981 4981 3200 3200
4980 4980 4980 3200 3200
select c1, c2, c3, length(c4) from ct1 where (c1 < 100 and c1 < 20 and c3 < 10) or ((c1 + c2) < 100 and c3 < 10 and (c1 + c2) >= 0);
c1 c2 c3 length(c4)
0 0 0 3200
1 1 1 3200
2 2 2 3200
3 3 3 3200
4 4 4 3200
5 5 5 3200
6 6 6 3200
7 7 7 3200
8 8 8 3200
9 9 9 3200
alter system minor freeze;
select c1, c2, c3, length(c4) from ct1 where c1 < 1;
c1 c2 c3 length(c4)
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c1 < 10;
c1 c2 c3 length(c4)
0 0 0 3200
1 1 1 3200
2 2 2 3200
3 3 3 3200
4 4 4 3200
5 5 5 3200
6 6 6 3200
7 7 7 3200
8 8 8 3200
9 9 9 3200
select c1, c2, c3, length(c4) from ct1 where c1 > 10000 limit 10;
c1 c2 c3 length(c4)
10001 10001 10001 3200
10002 10002 10002 3200
10003 10003 10003 3200
10004 10004 10004 3200
10005 10005 10005 3200
10006 10006 10006 3200
10007 10007 10007 3200
10008 10008 10008 3200
10009 10009 10009 3200
10010 10010 10010 3200
select c1, c2, c3, length(c4) from ct1 where c2 < 1;
c1 c2 c3 length(c4)
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c2 < 10;
c1 c2 c3 length(c4)
0 0 0 3200
1 1 1 3200
2 2 2 3200
3 3 3 3200
4 4 4 3200
5 5 5 3200
6 6 6 3200
7 7 7 3200
8 8 8 3200
9 9 9 3200
select c1, c2, c3, length(c4) from ct1 where c2 > 10000 limit 10;
c1 c2 c3 length(c4)
10001 10001 10001 3200
10002 10002 10002 3200
10003 10003 10003 3200
10004 10004 10004 3200
10005 10005 10005 3200
10006 10006 10006 3200
10007 10007 10007 3200
10008 10008 10008 3200
10009 10009 10009 3200
10010 10010 10010 3200
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 and c2 < 20;
c1 c2 c3 length(c4)
0 0 0 3200
1 1 1 3200
2 2 2 3200
3 3 3 3200
4 4 4 3200
5 5 5 3200
6 6 6 3200
7 7 7 3200
8 8 8 3200
9 9 9 3200
10 10 10 3200
11 11 11 3200
12 12 12 3200
13 13 13 3200
14 14 14 3200
15 15 15 3200
16 16 16 3200
17 17 17 3200
18 18 18 3200
19 19 19 3200
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 or c2 < 20;
c1 c2 c3 length(c4)
0 0 0 3200
1 1 1 3200
2 2 2 3200
3 3 3 3200
4 4 4 3200
5 5 5 3200
6 6 6 3200
7 7 7 3200
8 8 8 3200
9 9 9 3200
10 10 10 3200
11 11 11 3200
12 12 12 3200
13 13 13 3200
14 14 14 3200
15 15 15 3200
16 16 16 3200
17 17 17 3200
18 18 18 3200
19 19 19 3200
20 20 20 3200
21 21 21 3200
22 22 22 3200
23 23 23 3200
24 24 24 3200
25 25 25 3200
26 26 26 3200
27 27 27 3200
28 28 28 3200
29 29 29 3200
30 30 30 3200
31 31 31 3200
32 32 32 3200
33 33 33 3200
34 34 34 3200
35 35 35 3200
36 36 36 3200
37 37 37 3200
38 38 38 3200
39 39 39 3200
40 40 40 3200
41 41 41 3200
42 42 42 3200
43 43 43 3200
44 44 44 3200
45 45 45 3200
46 46 46 3200
47 47 47 3200
48 48 48 3200
49 49 49 3200
50 50 50 3200
select c1, c2, c3, length(c4) from ct1 where c1 < 1 order by c1 desc;
c1 c2 c3 length(c4)
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c1 < 10 order by c1 desc;
c1 c2 c3 length(c4)
9 9 9 3200
8 8 8 3200
7 7 7 3200
6 6 6 3200
5 5 5 3200
4 4 4 3200
3 3 3 3200
2 2 2 3200
1 1 1 3200
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c1 > 10000 order by c1 desc limit 10;
c1 c2 c3 length(c4)
11999 11999 11999 3200
11998 11998 11998 3200
11997 11997 11997 3200
11996 11996 11996 3200
11995 11995 11995 3200
11994 11994 11994 3200
11993 11993 11993 3200
11992 11992 11992 3200
11991 11991 11991 3200
11990 11990 11990 3200
select c1, c2, c3, length(c4) from ct1 where c2 < 1 order by c1 desc;
c1 c2 c3 length(c4)
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c2 < 10 order by c1 desc;
c1 c2 c3 length(c4)
9 9 9 3200
8 8 8 3200
7 7 7 3200
6 6 6 3200
5 5 5 3200
4 4 4 3200
3 3 3 3200
2 2 2 3200
1 1 1 3200
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c2 > 10000 order by c1 desc limit 10;
c1 c2 c3 length(c4)
11999 11999 11999 3200
11998 11998 11998 3200
11997 11997 11997 3200
11996 11996 11996 3200
11995 11995 11995 3200
11994 11994 11994 3200
11993 11993 11993 3200
11992 11992 11992 3200
11991 11991 11991 3200
11990 11990 11990 3200
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 and c2 < 20 order by c1 desc;
c1 c2 c3 length(c4)
19 19 19 3200
18 18 18 3200
17 17 17 3200
16 16 16 3200
15 15 15 3200
14 14 14 3200
13 13 13 3200
12 12 12 3200
11 11 11 3200
10 10 10 3200
9 9 9 3200
8 8 8 3200
7 7 7 3200
6 6 6 3200
5 5 5 3200
4 4 4 3200
3 3 3 3200
2 2 2 3200
1 1 1 3200
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 or c2 < 20 order by c1 desc;
c1 c2 c3 length(c4)
50 50 50 3200
49 49 49 3200
48 48 48 3200
47 47 47 3200
46 46 46 3200
45 45 45 3200
44 44 44 3200
43 43 43 3200
42 42 42 3200
41 41 41 3200
40 40 40 3200
39 39 39 3200
38 38 38 3200
37 37 37 3200
36 36 36 3200
35 35 35 3200
34 34 34 3200
33 33 33 3200
32 32 32 3200
31 31 31 3200
30 30 30 3200
29 29 29 3200
28 28 28 3200
27 27 27 3200
26 26 26 3200
25 25 25 3200
24 24 24 3200
23 23 23 3200
22 22 22 3200
21 21 21 3200
20 20 20 3200
19 19 19 3200
18 18 18 3200
17 17 17 3200
16 16 16 3200
15 15 15 3200
14 14 14 3200
13 13 13 3200
12 12 12 3200
11 11 11 3200
10 10 10 3200
9 9 9 3200
8 8 8 3200
7 7 7 3200
6 6 6 3200
5 5 5 3200
4 4 4 3200
3 3 3 3200
2 2 2 3200
1 1 1 3200
0 0 0 3200
select c1, c2, c3, length(c4) from ct1 where c5 is null;
c1 c2 c3 length(c4)
select c1, c2, c3, length(c4), length(c5) from ct1 limit 20;
c1 c2 c3 length(c4) length(c5)
0 0 0 3200 3200
1 1 1 3200 3200
2 2 2 3200 3200
3 3 3 3200 3200
4 4 4 3200 3200
5 5 5 3200 3200
6 6 6 3200 3200
7 7 7 3200 3200
8 8 8 3200 3200
9 9 9 3200 3200
10 10 10 3200 3200
11 11 11 3200 3200
12 12 12 3200 3200
13 13 13 3200 3200
14 14 14 3200 3200
15 15 15 3200 3200
16 16 16 3200 3200
17 17 17 3200 3200
18 18 18 3200 3200
19 19 19 3200 3200
select c1, c2, c3, length(c4), length(c5) from ct1 limit 20 offset 5000;
c1 c2 c3 length(c4) length(c5)
5000 5000 5000 3200 3200
5001 5001 5001 3200 3200
5002 5002 5002 3200 3200
5003 5003 5003 3200 3200
5004 5004 5004 3200 3200
5005 5005 5005 3200 3200
5006 5006 5006 3200 3200
5007 5007 5007 3200 3200
5008 5008 5008 3200 3200
5009 5009 5009 3200 3200
5010 5010 5010 3200 3200
5011 5011 5011 3200 3200
5012 5012 5012 3200 3200
5013 5013 5013 3200 3200
5014 5014 5014 3200 3200
5015 5015 5015 3200 3200
5016 5016 5016 3200 3200
5017 5017 5017 3200 3200
5018 5018 5018 3200 3200
5019 5019 5019 3200 3200
select c1, c2, c3, length(c4), length(c5) from ct1 order by c1 desc limit 20;
c1 c2 c3 length(c4) length(c5)
11999 11999 11999 3200 3200
11998 11998 11998 3200 3200
11997 11997 11997 3200 3200
11996 11996 11996 3200 3200
11995 11995 11995 3200 3200
11994 11994 11994 3200 3200
11993 11993 11993 3200 3200
11992 11992 11992 3200 3200
11991 11991 11991 3200 3200
11990 11990 11990 3200 3200
11989 11989 11989 3200 3200
11988 11988 11988 3200 3200
11987 11987 11987 3200 3200
11986 11986 11986 3200 3200
11985 11985 11985 3200 3200
11984 11984 11984 3200 3200
11983 11983 11983 3200 3200
11982 11982 11982 3200 3200
11981 11981 11981 3200 3200
11980 11980 11980 3200 3200
select c1, c2, c3, length(c4), length(c5) from ct1 order by c1 desc limit 20 offset 5000;
c1 c2 c3 length(c4) length(c5)
6999 6999 6999 3200 3200
6998 6998 6998 3200 3200
6997 6997 6997 3200 3200
6996 6996 6996 3200 3200
6995 6995 6995 3200 3200
6994 6994 6994 3200 3200
6993 6993 6993 3200 3200
6992 6992 6992 3200 3200
6991 6991 6991 3200 3200
6990 6990 6990 3200 3200
6989 6989 6989 3200 3200
6988 6988 6988 3200 3200
6987 6987 6987 3200 3200
6986 6986 6986 3200 3200
6985 6985 6985 3200 3200
6984 6984 6984 3200 3200
6983 6983 6983 3200 3200
6982 6982 6982 3200 3200
6981 6981 6981 3200 3200
6980 6980 6980 3200 3200
drop table ct1;

View File

@ -0,0 +1,897 @@
drop table if exists ct1;
set session ob_trx_timeout=100000000000;
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group for all columns, each column;
alter system minor freeze;
alter system major freeze;
update ct1 set c3 = 0 where c1 = 0;
update ct1 set c3 = 0 where c1 = 200;
update ct1 set c3 = 0 where c1 = 1200;
update ct1 set c3 = 0 where c1 = 5200;
update ct1 set c3 = 0 where c1 = 8803;
update ct1 set c3 = 0 where c1 = 9907;
insert into ct1 values(10001, 0, 0, '', '');
insert into ct1 values(20000, 0, 0, '', '');
select c1,c2 from ct1 where c2 <= 9;
c1 c2
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10001 0
20000 0
select c1,c2 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
c1 c2
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
select c1,c2 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
c1 c2
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10001 0
20000 0
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 9
8 8 8
7 7 7
6 6 6
5 5 5
4 4 4
3 3 3
2 2 2
1 1 1
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
c1 c2 c3
9 9 9
8 8 8
7 7 7
6 6 6
5 5 5
4 4 4
3 3 3
2 2 2
1 1 1
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 9
8 8 8
7 7 7
6 6 6
5 5 5
4 4 4
3 3 3
2 2 2
1 1 1
0 0 0
update ct1 set c3 = 0 where c1 < 1000;
update ct1 set c3 = 0 where c1 < 2000 and c1 >= 1000;
update ct1 set c3 = 0 where c1 < 3000 and c1 >= 2000;
update ct1 set c3 = 0 where c1 < 4000 and c1 >= 3000;
update ct1 set c3 = 0 where c1 < 5000 and c1 >= 4000;
update ct1 set c3 = 0 where c1 < 6000 and c1 >= 5000;
update ct1 set c3 = 0 where c1 < 7000 and c1 >= 6000;
update ct1 set c3 = 0 where c1 < 8000 and c1 >= 7000;
update ct1 set c3 = 0 where c1 < 9000 and c1 >= 8000;
update ct1 set c3 = 0 where c1 < 10000 and c1 >= 9000;
alter system set _rowsets_enabled = false;
alter system set _pushdown_storage_level = 0;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
c1 c2 c3
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select count(*) from ct1;
count(*)
10002
alter system set _rowsets_enabled = false;
alter system set _pushdown_storage_level = 4;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
c1 c2 c3
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select count(*) from ct1;
count(*)
10002
alter system set _rowsets_enabled = true;
alter system set _pushdown_storage_level = 0;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
c1 c2 c3
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select count(*) from ct1;
count(*)
10002
alter system set _rowsets_enabled = true;
alter system set _pushdown_storage_level = 4;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
c1 c2 c3
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select count(*) from ct1;
count(*)
10002
drop table ct1;
alter system enable_table_without_all_cg = false;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group for all columns, each column;
alter system minor freeze;
alter system major freeze;
update ct1 set c3 = 0 where c1 = 0;
update ct1 set c3 = 0 where c1 = 200;
update ct1 set c3 = 0 where c1 = 1200;
update ct1 set c3 = 0 where c1 = 5200;
update ct1 set c3 = 0 where c1 = 8803;
update ct1 set c3 = 0 where c1 = 9907;
insert into ct1 values(10001, 0, 0, '', '');
insert into ct1 values(20000, 0, 0, '', '');
select c1,c2 from ct1 where c2 <= 9;
c1 c2
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10001 0
20000 0
select c1,c2 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
c1 c2
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
select c1,c2 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
c1 c2
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10001 0
20000 0
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 9
8 8 8
7 7 7
6 6 6
5 5 5
4 4 4
3 3 3
2 2 2
1 1 1
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
c1 c2 c3
9 9 9
8 8 8
7 7 7
6 6 6
5 5 5
4 4 4
3 3 3
2 2 2
1 1 1
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 9
8 8 8
7 7 7
6 6 6
5 5 5
4 4 4
3 3 3
2 2 2
1 1 1
0 0 0
update ct1 set c3 = 0 where c1 < 1000;
update ct1 set c3 = 0 where c1 < 2000 and c1 >= 1000;
update ct1 set c3 = 0 where c1 < 3000 and c1 >= 2000;
update ct1 set c3 = 0 where c1 < 4000 and c1 >= 3000;
update ct1 set c3 = 0 where c1 < 5000 and c1 >= 4000;
update ct1 set c3 = 0 where c1 < 6000 and c1 >= 5000;
update ct1 set c3 = 0 where c1 < 7000 and c1 >= 6000;
update ct1 set c3 = 0 where c1 < 8000 and c1 >= 7000;
update ct1 set c3 = 0 where c1 < 9000 and c1 >= 8000;
update ct1 set c3 = 0 where c1 < 10000 and c1 >= 9000;
alter system set _rowsets_enabled = false;
alter system set _pushdown_storage_level = 0;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
c1 c2 c3
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select count(*) from ct1;
count(*)
10002
alter system set _rowsets_enabled = false;
alter system set _pushdown_storage_level = 4;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
c1 c2 c3
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select count(*) from ct1;
count(*)
10002
alter system set _rowsets_enabled = true;
alter system set _pushdown_storage_level = 0;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
c1 c2 c3
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select count(*) from ct1;
count(*)
10002
alter system set _rowsets_enabled = true;
alter system set _pushdown_storage_level = 4;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
c1 c2 c3
0 0 0
1 1 0
2 2 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 8 0
9 9 0
10001 0 0
20000 0 0
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
c1 c2 c3
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
c1 c2 c3
20000 0 0
10001 0 0
9 9 0
8 8 0
7 7 0
6 6 0
5 5 0
4 4 0
3 3 0
2 2 0
1 1 0
0 0 0
select count(*) from ct1;
count(*)
10002
drop table ct1;

View File

@ -0,0 +1,9 @@
create table tt1(a int, b int, c int, primary key(a)) with column group for all columns, each column;
create index idx_tt1 on tt1(b);
create table tt2(d int, e int);
alter table tt1 drop column c;
ERROR 0A000: drop column with column store table not supported
alter table tt1 modify column c varchar(20);
ERROR 0A000: alter column with column store table not supported
drop table tt1;
drop table tt2;

View File

@ -0,0 +1,40 @@
create table t1(a int, b varchar(3048), primary key (a)) with column group for all columns, each column;
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) with column group for all columns, each column;
create table t3(a int, b varchar(3048), primary key (a)) with column group for all columns, each column;
insert into t1 values(1, 1);
insert into t2 values(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
insert into t3 values(1, 1);
select count(*) from t1;
count(*)
501
alter system major freeze;
select count(*) from t1;
count(*)
1001
select * from t3;
a b c
1 1 NULL
2 1 1
select c from t3;
c
NULL
1
select count(c) from t3;
count(c)
1
INSERT INTO t1 VALUES(8000, repeat(8000,512));
alter system major freeze;
select count(*) from t1;
count(*)
1002
select * from t3;
a b c
1 1 NULL
2 1 1
select c from t3;
c
NULL
1
drop table t1;
drop table t2;
drop table t3;

View File

@ -0,0 +1,13 @@
create table t1(a int, b varchar(3048), primary key (a)) with column group for each column;
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) with column group for each column;
create table t3(a int, b varchar(3048), primary key (a)) with column group for each column;
insert into t1 values(1, 1);
insert into t2 values(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
insert into t3 values(1, 1);
select count(*) from t1;
count(*)
501
alter system major freeze;
drop table t1;
drop table t2;
drop table t3;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,359 @@
# owner: huronghui.hrh
# owner group: STORAGE
# description:
--disable_query_log
--disable_warnings
set @@recyclebin = off;
drop table if exists t1,t2;
--enable_warnings
--enable_query_log
alter system enable_table_without_all_cg = false;
create table t1(a int, b varchar(3048), primary key (a), c int) with column group for all columns, each column;
create table t2(pk int, c1 int, c2 int unsigned, c3 varchar(100)) block_size=2048 with column group for all columns, each column;
sleep 10;
--disable_query_log
--disable_warnings
--let $count=1
while ($count < 300)
{
eval INSERT INTO t1 VALUES($count, repeat($count * 10, 512), $count * 10);
eval insert into t2(pk, c1,c2,c3) values
($count * 10 + 1,$count * 10 + 1, $count * 10 + 1 + 1, concat("abcdefg", $count)),
($count * 10 + 2,$count * 10 + 2, $count * 10 + 2 + 1, concat("abcdefg", $count)),
($count * 10 + 3,$count * 10 + 3, $count * 10 + 3 + 1, concat("abcdefg", $count)),
($count * 10 + 4,$count * 10 + 4, $count * 10 + 4 + 1, concat("abcdefg", $count)),
($count * 10 + 5,$count * 10 + 5, $count * 10 + 5 + 1, concat("abcdefg", $count)),
($count * 10 + 6,$count * 10 + 6, $count * 10 + 6 + 1, concat("abcdefg", $count)),
($count * 10 + 7,$count * 10 + 7, $count * 10 + 7 + 1, concat("abcdefg", $count)),
($count * 10 + 8,$count * 10 + 8, $count * 10 + 8 + 1, concat("abcdefg", $count)),
($count * 10 + 9,$count * 10 + 9, $count * 10 + 9 + 1, concat("abcdefg", $count)),
($count * 10 + 10,$count * 10 + 10, $count * 10 + 10+ 1, concat("abcdefg", $count));
inc $count;
inc $count;
}
--enable_warnings
--enable_query_log
select count(*) from t1;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
alter system major freeze;
--source mysql_test/include/wait_daily_merge.inc
alter table t1 add column c1 int default 0, add column c2 varchar(100);
--disable_query_log
--disable_warnings
--let $count=300
while ($count < 500)
{
eval INSERT INTO t1 VALUES($count, repeat($count * 10, 512), $count * 10, $count, repeat($count, 5));
inc $count;
inc $count;
}
--enable_warnings
--enable_query_log
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*) from t1;
select count(c1) from t1;
select count(c2) from t1;
select count(c1) from t1 where c1 > 300;
select count(c1) from t1 where c1 < 30;
select a, c2, count(c1) from t1 where c1 > 480;
select c1, c2 from t1 where c1 > 480 and a < 495;
select b, c2, count(c1) from t1 where c1 > 490 and a < 495;
select a, c1, count(c1) from t1 where a <20 and c1 != 80 and c1 != 6 and c1 < 30;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
select count(*) from t1;
select count(c1) from t1;
select count(c2) from t1;
select count(c1) from t1 where c1 > 300;
select count(c1) from t1 where c1 < 30;
select a, c2, count(c1) from t1 where c1 > 480;
select c1, c2 from t1 where c1 > 480 and a < 495;
select b, c2, count(c1) from t1 where c1 > 490 and a < 495;
select a, c1, count(c1) from t1 where a <20 and c1 != 80 and c1 != 6 and c1 < 30;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*) from t1;
select count(c1) from t1;
select count(c2) from t1;
select count(c1) from t1 where c1 > 300;
select count(c1) from t1 where c1 < 30;
select a, c2, count(c1) from t1 where c1 > 480;
select c1, c2 from t1 where c1 > 480 and a < 495;
select b, c2, count(c1) from t1 where c1 > 490 and a < 495;
select a, c1, count(c1) from t1 where a <20 and c1 != 80 and c1 != 6 and c1 < 30;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
select count(*) from t1;
select count(c1) from t1;
select count(c2) from t1;
select count(c1) from t1 where c1 > 300;
select count(c1) from t1 where c1 < 30;
select a, c2, count(c1) from t1 where c1 > 480;
select c1, c2 from t1 where c1 > 480 and a < 495;
select b, c2, count(c1) from t1 where c1 > 490 and a < 495;
select a, c1, count(c1) from t1 where a <20 and c1 != 80 and c1 != 6 and c1 < 30;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
alter system major freeze;
--source mysql_test/include/wait_daily_merge.inc
alter table t2 add column c4 bigint default 10, add column c5 bigint unsigned default 20;
alter table t2 add column c6 bigint default null;
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
select count(*),count(c4),count(c5),count(c6) from t2;
select min(c4),min(c5),min(c6) from t2;
select max(c4),max(c5),max(c6) from t2;
select sum(c4),sum(c5),sum(c6) from t2;
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
select count(*) from t1;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
select count(*),count(c4),count(c5),count(c6) from t2;
select min(c4),min(c5),min(c6) from t2;
select max(c4),max(c5),max(c6) from t2;
select sum(c4),sum(c5),sum(c6) from t2;
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
select count(*) from t1;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
select count(*),count(c4),count(c5),count(c6) from t2;
select min(c4),min(c5),min(c6) from t2;
select max(c4),max(c5),max(c6) from t2;
select sum(c4),sum(c5),sum(c6) from t2;
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
select count(*) from t1;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
select count(*),count(c4),count(c5),count(c6) from t2;
select min(c4),min(c5),min(c6) from t2;
select max(c4),max(c5),max(c6) from t2;
select sum(c4),sum(c5),sum(c6) from t2;
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
select count(*) from t1;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
drop table t1,t2;
alter system enable_table_without_all_cg = true;
alter system flush plan cache;
create table t1(a int, b varchar(3048), primary key (a), c int) with column group for all columns, each column;
create table t2(pk int, c1 int, c2 int unsigned, c3 varchar(100)) block_size=2048 with column group for all columns, each column;
sleep 10;
--disable_query_log
--disable_warnings
--let $count=1
while ($count < 300)
{
eval INSERT INTO t1 VALUES($count, repeat($count * 10, 512), $count * 10);
eval insert into t2(pk, c1,c2,c3) values
($count * 10 + 1,$count * 10 + 1, $count * 10 + 1 + 1, concat("abcdefg", $count)),
($count * 10 + 2,$count * 10 + 2, $count * 10 + 2 + 1, concat("abcdefg", $count)),
($count * 10 + 3,$count * 10 + 3, $count * 10 + 3 + 1, concat("abcdefg", $count)),
($count * 10 + 4,$count * 10 + 4, $count * 10 + 4 + 1, concat("abcdefg", $count)),
($count * 10 + 5,$count * 10 + 5, $count * 10 + 5 + 1, concat("abcdefg", $count)),
($count * 10 + 6,$count * 10 + 6, $count * 10 + 6 + 1, concat("abcdefg", $count)),
($count * 10 + 7,$count * 10 + 7, $count * 10 + 7 + 1, concat("abcdefg", $count)),
($count * 10 + 8,$count * 10 + 8, $count * 10 + 8 + 1, concat("abcdefg", $count)),
($count * 10 + 9,$count * 10 + 9, $count * 10 + 9 + 1, concat("abcdefg", $count)),
($count * 10 + 10,$count * 10 + 10, $count * 10 + 10+ 1, concat("abcdefg", $count));
inc $count;
inc $count;
}
--enable_warnings
--enable_query_log
select count(*) from t1;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
alter system major freeze;
--source mysql_test/include/wait_daily_merge.inc
alter table t1 add column c1 int default 0, add column c2 varchar(100);
--disable_query_log
--disable_warnings
--let $count=300
while ($count < 500)
{
eval INSERT INTO t1 VALUES($count, repeat($count * 10, 512), $count * 10, $count, repeat($count, 5));
inc $count;
inc $count;
}
--enable_warnings
--enable_query_log
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*) from t1;
select count(c1) from t1;
select count(c2) from t1;
select count(c1) from t1 where c1 > 300;
select count(c1) from t1 where c1 < 30;
select a, c2, count(c1) from t1 where c1 > 480;
select c1, c2 from t1 where c1 > 480 and a < 495;
select b, c2, count(c1) from t1 where c1 > 490 and a < 495;
select a, c1, count(c1) from t1 where a <20 and c1 != 80 and c1 != 6 and c1 < 30;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
select count(*) from t1;
select count(c1) from t1;
select count(c2) from t1;
select count(c1) from t1 where c1 > 300;
select count(c1) from t1 where c1 < 30;
select a, c2, count(c1) from t1 where c1 > 480;
select c1, c2 from t1 where c1 > 480 and a < 495;
select b, c2, count(c1) from t1 where c1 > 490 and a < 495;
select a, c1, count(c1) from t1 where a <20 and c1 != 80 and c1 != 6 and c1 < 30;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*) from t1;
select count(c1) from t1;
select count(c2) from t1;
select count(c1) from t1 where c1 > 300;
select count(c1) from t1 where c1 < 30;
select a, c2, count(c1) from t1 where c1 > 480;
select c1, c2 from t1 where c1 > 480 and a < 495;
select b, c2, count(c1) from t1 where c1 > 490 and a < 495;
select a, c1, count(c1) from t1 where a <20 and c1 != 80 and c1 != 6 and c1 < 30;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
alter system major freeze;
--source mysql_test/include/wait_daily_merge.inc
alter table t2 add column c4 bigint default 10, add column c5 bigint unsigned default 20;
alter table t2 add column c6 bigint default null;
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
select count(*),count(c4),count(c5),count(c6) from t2;
select min(c4),min(c5),min(c6) from t2;
select max(c4),max(c5),max(c6) from t2;
select sum(c4),sum(c5),sum(c6) from t2;
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
select count(*) from t1;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
alter system set _pushdown_storage_level = 0;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
select count(*),count(c4),count(c5),count(c6) from t2;
select min(c4),min(c5),min(c6) from t2;
select max(c4),max(c5),max(c6) from t2;
select sum(c4),sum(c5),sum(c6) from t2;
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
select count(*) from t1;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = false;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
select count(*),count(c4),count(c5),count(c6) from t2;
select min(c4),min(c5),min(c6) from t2;
select max(c4),max(c5),max(c6) from t2;
select sum(c4),sum(c5),sum(c6) from t2;
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
select count(*) from t1;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
select count(*),count(pk),min(pk),max(pk),sum(pk),min(c1),max(c1),sum(c1),min(c2),max(c2),sum(c2),min(c3),max(c3) from t2;
select count(*),count(c4),count(c5),count(c6) from t2;
select min(c4),min(c5),min(c6) from t2;
select max(c4),max(c5),max(c6) from t2;
select sum(c4),sum(c5),sum(c6) from t2;
select count(*),min(pk),max(c1),sum(c2),min(c3),max(c4),sum(c5),count(c6) from t2;
select count(*) from t1;
select count(*),count(a),min(a),max(a),sum(a),count(b),min(b),max(b),count(c),min(c),max(c),sum(c) from t1;
select count(*),count(c1),min(c1),max(c1),sum(c1),count(c2),min(c2),max(c2) from t1;
drop table t1,t2;
--disable_query_log
set @@recyclebin = on;
alter system enable_table_without_all_cg = false;
alter system set _pushdown_storage_level = 4;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
--enable_query_log

View File

@ -0,0 +1,71 @@
# owner: yuxiaozhe.yxz
# owner group: storage
# description: execute query which filter by scanning columnar store
--disable_query_log
connect (conn1,$OBMYSQL_MS0,$OBMYSQL_USR,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
set @@session.explicit_defaults_for_timestamp=off;
set session ob_trx_timeout=100000000000;
set @@recyclebin = off;
--enable_query_log
connection conn1;
--disable_warnings
drop table if exists ct1;
--enable_warnings
create table ct1(c1 int, c2 int) with column group for all columns, each column;
--disable_query_log
--let $count = 0
while($count < 500)
{
eval insert into ct1 values
($count * 20+ 1 , $count * 20 + 1 ),
($count * 20+ 2 , $count * 20 + 2 ),
($count * 20+ 3 , $count * 20 + 3 ),
($count * 20+ 4 , $count * 20 + 4 ),
($count * 20+ 5 , $count * 20 + 5 ),
($count * 20+ 6 , $count * 20 + 6 ),
($count * 20+ 7 , $count * 20 + 7 ),
($count * 20+ 8 , $count * 20 + 8 ),
($count * 20+ 9 , $count * 20 + 9 ),
($count * 20+ 10, $count * 20 + 10),
($count * 20+ 11, $count * 20 + 11),
($count * 20+ 12, $count * 20 + 12),
($count * 20+ 13, $count * 20 + 13),
($count * 20+ 14, $count * 20 + 14),
($count * 20+ 15, $count * 20 + 15),
($count * 20+ 16, $count * 20 + 16),
($count * 20+ 17, $count * 20 + 17),
($count * 20+ 18, $count * 20 + 18),
($count * 20+ 19, $count * 20 + 19),
($count * 20+ 20, $count * 20 + 20);
inc $count;
}
--enable_query_log
connection default;
alter system major freeze;
--source mysql_test/include/wait_daily_merge.inc
connection conn1;
select * from ct1 where c1 < 1;
select * from ct1 where c1 < 10;
select * from ct1 where c1 > 10000;
select * from ct1 where c2 < 1;
select * from ct1 where c2 < 10;
select * from ct1 where c2 > 10000;
select * from ct1 where c1 > 400 and c1 < 500;
select * from ct1 where c1 > 9000 and c1 < 9300;
select * from ct1 where c1 < 10 or c2 > 9900;
select * from ct1 where c1 < 10 or c2 < 20;
select * from ct1 where c1 < 10 and c2 > 9900;
select * from ct1 where c1 > 10 and c2 < 20;
select * from ct1 where c1 * 2 > 500 and c2 * 2 < 600;
select * from ct1 where c1 * 2 < 500 or (c2 * 2 > 19000 and c2 * 2 < 20000) ;
drop table ct1;
--disable_query_log
set @@recyclebin = on;
--enable_query_log

View File

@ -0,0 +1,145 @@
# owner: yuxiaozhe.yxz
# owner group: storage
# description: execute query whith filter by scanning columnar store
connect (conn1,$OBMYSQL_MS0,$OBMYSQL_USR,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
connection conn1;
--disable_query_log
set @@session.explicit_defaults_for_timestamp=off;
set @@recyclebin = off;
--enable_query_log
--disable_warnings
drop table if exists ct1;
--enable_warnings
set session ob_trx_timeout=100000000000;
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group for all columns, each column;
--disable_query_log
--let $count = 0
while($count < 1000)
{
eval insert into ct1 values($count * 10, $count * 10, $count * 10, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 1, $count * 10 + 1, $count * 10 + 1, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 2, $count * 10 + 2, $count * 10 + 2, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 3, $count * 10 + 3, $count * 10 + 3, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 4, $count * 10 + 4, $count * 10 + 4, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 5, $count * 10 + 5, $count * 10 + 5, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 6, $count * 10 + 6, $count * 10 + 6, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 7, $count * 10 + 7, $count * 10 + 7, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 8, $count * 10 + 8, $count * 10 + 8, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 9, $count * 10 + 9, $count * 10 + 9, repeat(md5(rand()), 100), repeat(md5(rand()), 100));
--inc $count
}
--enable_query_log
connection default;
alter system minor freeze;
--source mysql_test/include/wait_minor_merge.inc
alter system major freeze;
--source mysql_test/include/wait_daily_merge.inc
connection conn1;
select c1, c2, c3, length(c4) from ct1 where c1 < 1;
select c1, c2, c3, length(c4) from ct1 where c1 < 10;
select c1, c2, c3, length(c4) from ct1 where c1 > 10000;
select c1, c2, c3, length(c4) from ct1 where c2 < 1;
select c1, c2, c3, length(c4) from ct1 where c2 < 10;
select c1, c2, c3, length(c4) from ct1 where c2 > 10000;
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 and c2 < 20;
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 or c2 < 20;
select c1, c2, c3, length(c4) from ct1 where c1 < 1 order by c1 desc;
select c1, c2, c3, length(c4) from ct1 where c1 < 10 order by c1 desc;
select c1, c2, c3, length(c4) from ct1 where c1 > 10000 order by c1 desc;
select c1, c2, c3, length(c4) from ct1 where c2 < 1 order by c1 desc;
select c1, c2, c3, length(c4) from ct1 where c2 < 10 order by c1 desc;
select c1, c2, c3, length(c4) from ct1 where c2 > 10000 order by c1 desc;
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 and c2 < 20 order by c1 desc;
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 or c2 < 20 order by c1 desc;
select c1, c2, c3, length(c4) from ct1 where c5 is null;
select c1, c2, c3, length(c4), length(c5) from ct1 limit 20;
select c1, c2, c3, length(c4), length(c5) from ct1 limit 20 offset 5000;
select c1, c2, c3, length(c4), length(c5) from ct1 order by c1 desc limit 20;
select c1, c2, c3, length(c4), length(c5) from ct1 order by c1 desc limit 20 offset 5000;
select c1, c2, c3, length(c4) from ct1 where (c1 < 100 and c1 < 20 and c3 < 10) or ((c1 + c2) < 100 and c3 < 10 and (c1 + c2) >= 0);
# insert 1000 rows in minor
--disable_query_log
while($count < 1100)
{
eval insert into ct1 values($count * 10, $count * 10, $count * 10, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 1, $count * 10 + 1, $count * 10 + 1, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 2, $count * 10 + 2, $count * 10 + 2, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 3, $count * 10 + 3, $count * 10 + 3, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 4, $count * 10 + 4, $count * 10 + 4, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 5, $count * 10 + 5, $count * 10 + 5, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 6, $count * 10 + 6, $count * 10 + 6, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 7, $count * 10 + 7, $count * 10 + 7, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 8, $count * 10 + 8, $count * 10 + 8, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 9, $count * 10 + 9, $count * 10 + 9, repeat(md5(rand()), 100), repeat(md5(rand()), 100));
--inc $count
}
--enable_query_log
connection default;
alter system minor freeze;
--source mysql_test/include/wait_minor_merge.inc
# insert 1000 rows in memtable
connection conn1;
--disable_query_log
while($count < 1200)
{
eval insert into ct1 values($count * 10, $count * 10, $count * 10, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 1, $count * 10 + 1, $count * 10 + 1, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 2, $count * 10 + 2, $count * 10 + 2, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 3, $count * 10 + 3, $count * 10 + 3, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 4, $count * 10 + 4, $count * 10 + 4, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 5, $count * 10 + 5, $count * 10 + 5, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 6, $count * 10 + 6, $count * 10 + 6, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 7, $count * 10 + 7, $count * 10 + 7, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 8, $count * 10 + 8, $count * 10 + 8, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 9, $count * 10 + 9, $count * 10 + 9, repeat(md5(rand()), 100), repeat(md5(rand()), 100));
--inc $count
}
--enable_query_log
select c1, c2, c3, length(c4) from ct1 where c1 < 1;
select c1, c2, c3, length(c4) from ct1 where c1 < 10;
select c1, c2, c3, length(c4) from ct1 where c1 > 10000 limit 10;
select c1, c2, c3, length(c4) from ct1 where c2 < 1;
select c1, c2, c3, length(c4) from ct1 where c2 < 10;
select c1, c2, c3, length(c4) from ct1 where c2 > 10000 limit 10;
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 and c2 < 20;
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 or c2 < 20;
select c1, c2, c3, length(c4) from ct1 where c1 < 1 order by c1 desc;
select c1, c2, c3, length(c4) from ct1 where c1 < 10 order by c1 desc;
select c1, c2, c3, length(c4) from ct1 where c1 > 10000 order by c1 desc limit 10;
select c1, c2, c3, length(c4) from ct1 where c2 < 1 order by c1 desc;
select c1, c2, c3, length(c4) from ct1 where c2 < 10 order by c1 desc;
select c1, c2, c3, length(c4) from ct1 where c2 > 10000 order by c1 desc limit 10;
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 and c2 < 20 order by c1 desc;
select c1, c2, c3, length(c4) from ct1 where c1 + c2 <= 100 or c2 < 20 order by c1 desc;
select c1, c2, c3, length(c4) from ct1 where c5 is null;
select c1, c2, c3, length(c4), length(c5) from ct1 limit 20;
select c1, c2, c3, length(c4), length(c5) from ct1 limit 20 offset 5000;
select c1, c2, c3, length(c4), length(c5) from ct1 order by c1 desc limit 20;
select c1, c2, c3, length(c4), length(c5) from ct1 order by c1 desc limit 20 offset 5000;
drop table ct1;
--disable_query_log
set @@recyclebin = on;
--enable_query_log

View File

@ -0,0 +1,232 @@
# owner: yuxiaozhe.yxz
# owner group: storage
# description: execute query which scan columnar store and row store
--disable_query_log
set @@session.explicit_defaults_for_timestamp=off;
--enable_query_log
connect (conn1,$OBMYSQL_MS0,$OBMYSQL_USR,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
connection conn1;
--disable_query_log
alter system enable_table_without_all_cg = true;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
set @@recyclebin = off;
--enable_query_log
--disable_warnings
drop table if exists ct1;
--enable_warnings
set session ob_trx_timeout=100000000000;
# create table without all column group
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group for all columns, each column;
--disable_query_log
--let $count = 0
while($count < 1000)
{
eval insert into ct1 values($count * 10, $count * 10, $count * 10, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 1, $count * 10 + 1, $count * 10 + 1, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 2, $count * 10 + 2, $count * 10 + 2, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 3, $count * 10 + 3, $count * 10 + 3, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 4, $count * 10 + 4, $count * 10 + 4, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 5, $count * 10 + 5, $count * 10 + 5, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 6, $count * 10 + 6, $count * 10 + 6, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 7, $count * 10 + 7, $count * 10 + 7, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 8, $count * 10 + 8, $count * 10 + 8, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 9, $count * 10 + 9, $count * 10 + 9, repeat(md5(rand()), 100), repeat(md5(rand()), 100));
--inc $count
}
--enable_query_log
alter system minor freeze;
--source mysql_test/include/wait_minor_merge.inc
alter system major freeze;
--source mysql_test/include/wait_daily_merge.inc
update ct1 set c3 = 0 where c1 = 0;
update ct1 set c3 = 0 where c1 = 200;
update ct1 set c3 = 0 where c1 = 1200;
update ct1 set c3 = 0 where c1 = 5200;
update ct1 set c3 = 0 where c1 = 8803;
update ct1 set c3 = 0 where c1 = 9907;
insert into ct1 values(10001, 0, 0, '', '');
insert into ct1 values(20000, 0, 0, '', '');
select c1,c2 from ct1 where c2 <= 9;
select c1,c2 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
select c1,c2 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
update ct1 set c3 = 0 where c1 < 1000;
update ct1 set c3 = 0 where c1 < 2000 and c1 >= 1000;
update ct1 set c3 = 0 where c1 < 3000 and c1 >= 2000;
update ct1 set c3 = 0 where c1 < 4000 and c1 >= 3000;
update ct1 set c3 = 0 where c1 < 5000 and c1 >= 4000;
update ct1 set c3 = 0 where c1 < 6000 and c1 >= 5000;
update ct1 set c3 = 0 where c1 < 7000 and c1 >= 6000;
update ct1 set c3 = 0 where c1 < 8000 and c1 >= 7000;
update ct1 set c3 = 0 where c1 < 9000 and c1 >= 8000;
update ct1 set c3 = 0 where c1 < 10000 and c1 >= 9000;
alter system set _rowsets_enabled = false;
alter system set _pushdown_storage_level = 0;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
select count(*) from ct1;
alter system set _rowsets_enabled = false;
alter system set _pushdown_storage_level = 4;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
select count(*) from ct1;
alter system set _rowsets_enabled = true;
alter system set _pushdown_storage_level = 0;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
select count(*) from ct1;
alter system set _rowsets_enabled = true;
alter system set _pushdown_storage_level = 4;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
select count(*) from ct1;
drop table ct1;
alter system enable_table_without_all_cg = false;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
# create table with all column group
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group for all columns, each column;
--disable_query_log
--let $count = 0
while($count < 1000)
{
eval insert into ct1 values($count * 10, $count * 10, $count * 10, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 1, $count * 10 + 1, $count * 10 + 1, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 2, $count * 10 + 2, $count * 10 + 2, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 3, $count * 10 + 3, $count * 10 + 3, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 4, $count * 10 + 4, $count * 10 + 4, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 5, $count * 10 + 5, $count * 10 + 5, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 6, $count * 10 + 6, $count * 10 + 6, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 7, $count * 10 + 7, $count * 10 + 7, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 8, $count * 10 + 8, $count * 10 + 8, repeat(md5(rand()), 100), repeat(md5(rand()), 100)),
($count * 10 + 9, $count * 10 + 9, $count * 10 + 9, repeat(md5(rand()), 100), repeat(md5(rand()), 100));
--inc $count
}
--enable_query_log
alter system minor freeze;
--source mysql_test/include/wait_minor_merge.inc
alter system major freeze;
--source mysql_test/include/wait_daily_merge.inc
update ct1 set c3 = 0 where c1 = 0;
update ct1 set c3 = 0 where c1 = 200;
update ct1 set c3 = 0 where c1 = 1200;
update ct1 set c3 = 0 where c1 = 5200;
update ct1 set c3 = 0 where c1 = 8803;
update ct1 set c3 = 0 where c1 = 9907;
insert into ct1 values(10001, 0, 0, '', '');
insert into ct1 values(20000, 0, 0, '', '');
select c1,c2 from ct1 where c2 <= 9;
select c1,c2 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
select c1,c2 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
update ct1 set c3 = 0 where c1 < 1000;
update ct1 set c3 = 0 where c1 < 2000 and c1 >= 1000;
update ct1 set c3 = 0 where c1 < 3000 and c1 >= 2000;
update ct1 set c3 = 0 where c1 < 4000 and c1 >= 3000;
update ct1 set c3 = 0 where c1 < 5000 and c1 >= 4000;
update ct1 set c3 = 0 where c1 < 6000 and c1 >= 5000;
update ct1 set c3 = 0 where c1 < 7000 and c1 >= 6000;
update ct1 set c3 = 0 where c1 < 8000 and c1 >= 7000;
update ct1 set c3 = 0 where c1 < 9000 and c1 >= 8000;
update ct1 set c3 = 0 where c1 < 10000 and c1 >= 9000;
alter system set _rowsets_enabled = false;
alter system set _pushdown_storage_level = 0;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
select count(*) from ct1;
alter system set _rowsets_enabled = false;
alter system set _pushdown_storage_level = 4;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
select count(*) from ct1;
alter system set _rowsets_enabled = true;
alter system set _pushdown_storage_level = 0;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
select count(*) from ct1;
alter system set _rowsets_enabled = true;
alter system set _pushdown_storage_level = 4;
alter system flush plan cache;
select c1,c2,c3 from ct1 where c2 <= 9;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000));
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000));
select c1,c2,c3 from ct1 where c2 <= 9 order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000)) order by c1 desc;
select c1,c2,c3 from ct1 where c2 <= 9 and ((c1 >= 0 and c1 <= 3000) or (c1 >= 4000 and c1 <= 8000) or (c1 >= 9000 and c1 <= 30000)) order by c1 desc;
select count(*) from ct1;
drop table ct1;
--disable_query_log
set @@recyclebin = on;
alter system enable_table_without_all_cg = false;
alter system set _rowsets_enabled = true;
alter system set _pushdown_storage_level = 4;
alter system flush plan cache;
--enable_query_log

View File

@ -0,0 +1,60 @@
#owner: fenggu.yh
#owner group: storage
#tags: column_group
connect (sys_conn,$OBMYSQL_MS0,admin,$OBMYSQL_PWD,oceanbase,$OBMYSQL_PORT);
connection sys_conn;
--disable_query_log
--disable_warnings
set @@recyclebin = off;
drop table if exists tt1;
drop table if exists tt2;
--enable_warnings
--enable_query_log
create table tt1(a int, b int, c int, primary key(a)) with column group for all columns, each column;
create index idx_tt1 on tt1(b);
create table tt2(d int, e int);
--error 1235
alter table tt1 drop column c;
--error 1235
alter table tt1 modify column c varchar(20);
let $tt1_table_id= query_get_value(select table_id from __all_virtual_table where table_name='tt1', table_id, 1);
let $tt2_table_id= query_get_value(select table_id from __all_virtual_table where table_name='tt2', table_id, 1);
## In tt1 table schema, there exists 5 column_group: __co_default, __co_all, __cg_a, __cg_b, __cg_c
let $tt1_cg_cnt = query_get_value(select count(*) as cg_cnt from __all_column_group where table_id=$tt1_table_id, cg_cnt, 1);
if ($tt1_cg_cnt != 5)
{
--echo unexpected column_group count of table tt1, real value is $tt1_cg_cnt
}
## tt1 default_type column_group will have none column_id mapping, cuz it has all_type & each_type column_group
let $tt1_default_cg_id = query_get_value(select column_group_id from __all_column_group where table_id=$tt1_table_id and column_group_name='__co_default', column_group_id, 1);
let $tt1_column_id_cnt = query_get_value(select count(*) as mapping_cnt from __all_column_group_mapping where table_id=$tt1_table_id and column_group_id=$tt1_default_cg_id, mapping_cnt, 1);
if ($tt1_column_id_cnt != 0)
{
--echo unexpected column_group mapping count of table tt1, real value is $tt1_column_id_cnt;
}
## In tt2 table schema, there exists only 1 column_group: __co_default
let $tt2_cg_cnt = query_get_value(select count(*) as cg_cnt from __all_column_group where table_id=$tt2_table_id, cg_cnt, 1);
if ($tt2_cg_cnt != 1)
{
--echo unexpected column_group count of table tt2, real value is $tt2_cg_cnt
}
## tt2 default_type column_group will have 3 column_id mapping, include d, e, pk_increment
let $tt2_default_cg_id = query_get_value(select column_group_id from __all_column_group where table_id=$tt2_table_id and column_group_name='__co_default', column_group_id, 1);
let $tt2_column_id_cnt = query_get_value(select count(*) as mapping_cnt from __all_column_group_mapping where table_id=$tt2_table_id and column_group_id=$tt2_default_cg_id, mapping_cnt, 1);
if ($tt2_column_id_cnt != 3)
{
--echo unexpected column_group mapping count of table tt2, real value is $tt2_column_id_cnt
}
drop table tt1;
drop table tt2;
--disable_query_log
set @@recyclebin = on;
--enable_query_log

View File

@ -0,0 +1,94 @@
# owner: lixia.yq
# owner group: STORAGE
# description:
--disable_query_log
--disable_warnings
set @@recyclebin = off;
drop table if exists t1;
drop table if exists t2;
drop table if exists t3;
--enable_warnings
--enable_query_log
create table t1(a int, b varchar(3048), primary key (a)) with column group for all columns, each column;
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) with column group for all columns, each column;
create table t3(a int, b varchar(3048), primary key (a)) with column group for all columns, each column;
sleep 10;
insert into t1 values(1, 1);
insert into t2 values(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
insert into t3 values(1, 1);
--disable_query_log
--disable_warnings
--let $count=1
while ($count < 100)
{
eval INSERT INTO t1 VALUES($count * 10 , repeat($count * 10 ,512));
eval INSERT INTO t1 VALUES($count * 10 + 2, repeat($count * 10 + 2,512));
eval INSERT INTO t1 VALUES($count * 10 + 4, repeat($count * 10 + 4,512));
eval INSERT INTO t1 VALUES($count * 10 + 6, repeat($count * 10 + 6,512));
eval INSERT INTO t1 VALUES($count * 10 + 8, repeat($count * 10 + 8,512));
eval INSERT INTO t1 VALUES($count * 20 , repeat($count * 20 ,512));
eval INSERT INTO t1 VALUES($count * 20 + 2, repeat($count * 20 + 2,512));
eval INSERT INTO t1 VALUES($count * 20 + 4, repeat($count * 20 + 3,512));
eval INSERT INTO t1 VALUES($count * 20 + 6, repeat($count * 20 + 6,512));
eval INSERT INTO t1 VALUES($count * 20 + 8, repeat($count * 20 + 8,512));
inc $count;
inc $count;
}
--enable_warnings
--enable_query_log
select count(*) from t1;
alter system major freeze;
--source mysql_test/include/wait_daily_merge.inc
--disable_query_log
--disable_warnings
--let $count=1
while ($count < 100)
{
eval INSERT INTO t1 VALUES($count * 10 + 1, repeat($count * 10 ,512));
eval INSERT INTO t1 VALUES($count * 10 + 3, repeat($count * 10 + 2,512));
eval INSERT INTO t1 VALUES($count * 10 + 5, repeat($count * 10 + 4,512));
eval INSERT INTO t1 VALUES($count * 10 + 7, repeat($count * 10 + 6,512));
eval INSERT INTO t1 VALUES($count * 10 + 9, repeat($count * 10 + 8,512));
eval INSERT INTO t1 VALUES($count * 20 + 1, repeat($count * 20 ,512));
eval INSERT INTO t1 VALUES($count * 20 + 3, repeat($count * 20 + 2,512));
eval INSERT INTO t1 VALUES($count * 20 + 5, repeat($count * 20 + 3,512));
eval INSERT INTO t1 VALUES($count * 20 + 7, repeat($count * 20 + 6,512));
eval INSERT INTO t1 VALUES($count * 20 + 9, repeat($count * 20 + 8,512));
inc $count;
inc $count;
}
alter table t3 add column c int;
insert into t3 values(2, 1, 1);
--enable_warnings
--enable_query_log
select count(*) from t1;
select * from t3;
select c from t3;
select count(c) from t3;
--let $count=8000
eval INSERT INTO t1 VALUES($count, repeat($count,512));
alter system major freeze;
--source mysql_test/include/wait_daily_merge.inc
select count(*) from t1;
select * from t3;
select c from t3;
drop table t1;
drop table t2;
drop table t3;
--disable_query_log
set @@recyclebin = on;
--enable_query_log

View File

@ -0,0 +1,83 @@
# owner: huronghui.hrh
# owner group: STORAGE
# description:
--disable_query_log
--disable_warnings
set @@recyclebin = off;
drop table if exists t1;
drop table if exists t2;
drop table if exists t3;
--enable_warnings
--enable_query_log
create table t1(a int, b varchar(3048), primary key (a)) with column group for each column;
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) with column group for each column;
create table t3(a int, b varchar(3048), primary key (a)) with column group for each column;
sleep 10;
insert into t1 values(1, 1);
insert into t2 values(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
insert into t3 values(1, 1);
--disable_query_log
--disable_warnings
--let $count=1
while ($count < 100)
{
eval INSERT INTO t1 VALUES($count * 10 , repeat($count * 10 ,512));
eval INSERT INTO t1 VALUES($count * 10 + 2, repeat($count * 10 + 2,512));
eval INSERT INTO t1 VALUES($count * 10 + 4, repeat($count * 10 + 4,512));
eval INSERT INTO t1 VALUES($count * 10 + 6, repeat($count * 10 + 6,512));
eval INSERT INTO t1 VALUES($count * 10 + 8, repeat($count * 10 + 8,512));
eval INSERT INTO t1 VALUES($count * 20 , repeat($count * 20 ,512));
eval INSERT INTO t1 VALUES($count * 20 + 2, repeat($count * 20 + 2,512));
eval INSERT INTO t1 VALUES($count * 20 + 4, repeat($count * 20 + 3,512));
eval INSERT INTO t1 VALUES($count * 20 + 6, repeat($count * 20 + 6,512));
eval INSERT INTO t1 VALUES($count * 20 + 8, repeat($count * 20 + 8,512));
inc $count;
inc $count;
}
--enable_warnings
--enable_query_log
select count(*) from t1;
alter system major freeze;
--source mysql_test/include/wait_daily_merge.inc
--disable_query_log
--disable_warnings
--let $count=1
while ($count < 100)
{
eval INSERT INTO t1 VALUES($count * 10 + 1, repeat($count * 10 ,512));
eval INSERT INTO t1 VALUES($count * 10 + 3, repeat($count * 10 + 2,512));
eval INSERT INTO t1 VALUES($count * 10 + 5, repeat($count * 10 + 4,512));
eval INSERT INTO t1 VALUES($count * 10 + 7, repeat($count * 10 + 6,512));
eval INSERT INTO t1 VALUES($count * 10 + 9, repeat($count * 10 + 8,512));
eval INSERT INTO t1 VALUES($count * 20 + 1, repeat($count * 20 ,512));
eval INSERT INTO t1 VALUES($count * 20 + 3, repeat($count * 20 + 2,512));
eval INSERT INTO t1 VALUES($count * 20 + 5, repeat($count * 20 + 3,512));
eval INSERT INTO t1 VALUES($count * 20 + 7, repeat($count * 20 + 6,512));
eval INSERT INTO t1 VALUES($count * 20 + 9, repeat($count * 20 + 8,512));
inc $count;
inc $count;
}
alter table t3 add column c int;
insert into t3 values(2, 1, 1);
alter system major freeze;
--source mysql_test/include/wait_daily_merge.inc
--enable_warnings
--enable_query_log
drop table t1;
drop table t2;
drop table t3;
--disable_query_log
set @@recyclebin = on;
--enable_query_log

View File

@ -0,0 +1,109 @@
# owner: yht146439
# owner group: storage
# description: project with tile scanner
--disable_query_log
set @@session.explicit_defaults_for_timestamp=off;
set @@recyclebin = off;
--disable_warnings
set session ob_query_timeout=10000000000;
drop table if exists ct1,ct2,ct3;
--enable_warnings
--disable_query_log
create table ct1 (c1 int, c2 int) with column group for all columns, each column;
create table ct2(c1 int, c2 varchar(100), c3 varchar(1000)) block_size=2048 with column group for all columns, each column;
create table ct3(c1 int primary key, c2 int, c3 int, c4 int) partition by hash(c1) partitions 2 with column group for all columns, each column;
--let $count = 0
while($count < 1000)
{
eval insert into ct1(c1,c2) values
($count * 10 + 1 ,$count * 10 + 1 + 1),
($count * 10 + 2 ,$count * 10 + 2 + 1),
($count * 10 + 3 ,$count * 10 + 3 + 1),
($count * 10 + 4 ,$count * 10 + 4 + 1),
($count * 10 + 5 ,$count * 10 + 5 + 1),
($count * 10 + 6 ,$count * 10 + 6 + 1),
($count * 10 + 7 ,$count * 10 + 7 + 1),
($count * 10 + 8 ,$count * 10 + 8 + 1),
($count * 10 + 9 ,$count * 10 + 9 + 1),
($count * 10 + 10,$count * 10 + 10+ 1);
eval insert into ct2(c1,c2,c3) values
($count * 10 + 1 ,repeat('a',($count * 10 + 1 ) % 100),repeat('a',($count * 10 + 1 ) % 1000)),
($count * 10 + 2 ,repeat('a',($count * 10 + 2 ) % 100),repeat('a',($count * 10 + 2 ) % 1000)),
($count * 10 + 3 ,repeat('a',($count * 10 + 3 ) % 100),repeat('a',($count * 10 + 3 ) % 1000)),
($count * 10 + 4 ,repeat('a',($count * 10 + 4 ) % 100),repeat('a',($count * 10 + 4 ) % 1000)),
($count * 10 + 5 ,repeat('a',($count * 10 + 5 ) % 100),repeat('a',($count * 10 + 5 ) % 1000)),
($count * 10 + 6 ,repeat('a',($count * 10 + 6 ) % 100),repeat('a',($count * 10 + 6 ) % 1000)),
($count * 10 + 7 ,repeat('a',($count * 10 + 7 ) % 100),repeat('a',($count * 10 + 7 ) % 1000)),
($count * 10 + 8 ,repeat('a',($count * 10 + 8 ) % 100),repeat('a',($count * 10 + 8 ) % 1000)),
($count * 10 + 9 ,repeat('a',($count * 10 + 9 ) % 100),repeat('a',($count * 10 + 9 ) % 1000)),
($count * 10 + 10,repeat('a',($count * 10 + 10) % 100),repeat('a',($count * 10 + 10) % 1000));
--inc $count
}
insert into ct3 select c1,c1,c1,c1 from ct1 limit 1000;
alter system minor freeze;
--source mysql_test/include/wait_minor_merge.inc
alter system major freeze;
--source mysql_test/include/wait_daily_merge.inc
select * from ct1 where c1 > c2;
select * from ct1 where c1 < c2 limit 100;
select * from ct1 where c1 = c2;
select * from ct1 where c1 - c2 > 1;
select * from ct1 where c1 - c2 = -1 limit 100;
select * from ct1 where c1 - c2 = -1 order by c1 desc limit 100;
select * from ct1 where c1 + c2 < 20;
select * from ct1 where c1 + c2 > 19980;
select c1,c2 from ct1 where c1 + c2 < 1000;
select c1,char_length(c2) from ct2 where c1 > 9900;
select c1,char_length(c3) from ct2 where c1 > 9900;
select c1,char_length(c2),char_length(c3) from ct2 where c1 > 9000;
select max(c1) from ct2 where c2 < c3;
select min(c1),char_length(c2),char_length(c3) from ct2;
select * from ct1 limit 1 offset 1000;
select * from ct1 limit 100 offset 1000;
select * from ct1 limit 255 offset 1000;
select * from ct1 limit 256 offset 1000;
select * from ct1 limit 257 offset 1000;
select * from ct1 limit 100 offset 8190;
select * from ct1 limit 100 offset 8191;
select * from ct1 limit 100 offset 8192;
select * from ct1 limit 100 offset 8193;
select * from ct1 where c1 % 2 = 0 limit 100 offset 1000;
select * from ct1 where c1 - c2 = -1 limit 1 offset 10;
select * from ct1 where c1 - c2 = -1 limit 1 offset 100;
select * from ct1 where c1 - c2 = -1 limit 1 offset 1000;
select * from ct1 where c1 - c2 = -1 limit 1 offset 10000;
select * from ct1 where c1 - c2 = -1 limit 255 offset 1000;
select * from ct1 where c1 - c2 = -1 limit 256 offset 1000;
select * from ct1 where c1 - c2 = -1 limit 257 offset 1000;
select * from ct1 where c1 - c2 = -1 limit 1000 offset 1000;
select * from ct1 where c1 + c2 > 19980 and rand() < 2;
select * from ct1 where c1 + c2 > 19980 and rand() > 2;
select * from ct1 where c1 > 9990 and rand() + rand() > 2;
select * from ct1 where c1 > 9990 and rand() + rand() < 2;
select c1,char_length(c2),char_length(c3) from ct2 where c1 > 9000 and rand() < 2;
select c1,char_length(c2),char_length(c3) from ct2 where c1 > 9000 and rand() > 2;
select c1 from ct2 where rand() > 2 or c1 < 10;
select c1 from ct2 where rand() > 2 and c1 < 10;
select c1 from ct2 where rand() > 2 or rand() > 10;
select count(*) from ct1,ct2 where ct2.c1 < ct1.c1 and ct1.c1 < 100;
select sum(c1),sum(char_length(c2)),sum(char_length(c3)) from ct2;
select/*+ parallel(2)*/ sum(c1),sum(char_length(c2)),sum(char_length(c3)) from ct2;
select c2 from ct3 order by c1 desc limit 2;
select c2 from ct3 order by c1 desc limit 20;
select c2 from ct3 order by c1 asc limit 2;
select c2 from ct3 order by c1 asc limit 20;
drop table if exists ct1,ct2,ct3;
--disable_query_log
set @@recyclebin = on;
--enable_query_log