oceanbase/unittest/sql/optimizer/opt_est/test_sel_special.sql
wangzelin.wzl 93a1074b0c patch 4.0
2022-10-24 17:57:12 +08:00

14 lines
498 B
SQL

# A1 = (10000-1000)/10000, A2 = (5000-1000)/5000
# B1 = A1*1/1000, B2 = A2*1/1000
#table1 B1
#table2 B2
select * from t1,t2 where t1.c1 = t2.c1;
#table1 B1 + A1 * 1 - B1*A1
#table2 B2 + A1 * 1 - B2*A1
select * from t1,t2 where t1.c1 = t2.c1 or t1.c1 > 1;
select * from t1,t2 where t1.c1 = t2.c1 and t1.c1 > 1;
#DEFAULT_INEQ_SEL
select * from t1,t2 where t1.c1 < t2.c1;
select * from t1,t2 where t1.c1 > t2.c1;
select * from t1,t2 where t1.c1 != t2.c1;