You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with cte_192 ( col_1101,col_1102,col_1103,col_1104 ) AS ( select /*+ use_index_merge( tl6e913fb9 ) */ replace( tl6e913fb9.col_36 , tl6e913fb9.col_36 , tl6e913fb9.col_36 ) as r0 , space( 0 ) as r1 , min( distinct tl6e913fb9.col_36 ) as r2 , count( distinct tl6e913fb9.col_36 ) as r3 from tl6e913fb9 where tl6e913fb9.col_36 between 'n92ok$B%W#UU%O' and '()c=KVQ=T%-vzGJ' and tl6e913fb9.col_36 in ( 'T+kf' ,'Lvluod2H' ,'3#Omx@pC^fFkeH' ,'=b$z' ) group by tl6e913fb9.col_36 having tl6e913fb9.col_36 = 'xjV@' or IsNull( tl6e913fb9.col_36 ) ) ( select 1,col_1101,col_1102,col_1103,col_1104 from cte_192 where not( IsNull( cte_192.col_1102 ) ) order by 1,2,3,4,5 limit 72850972 );
750
+
1 col_1101 col_1102 col_1103 col_1104
751
+
drop table if exists t;
752
+
create table t (id int unique key, c int);
753
+
insert into t values (1, 10);
754
+
insert into t values (2, 20);
755
+
insert into t values (3, 30);
756
+
select _tidb_rowid from t where id in (1, 2, 3);
757
+
_tidb_rowid
758
+
1
759
+
2
760
+
3
761
+
drop table if exists t, t1;
762
+
create table t(a int);
763
+
create table t1(a int primary key, b int, index idx(b));
764
+
insert into t values(1), (2), (123);
765
+
insert into t1 values(2, 123), (123, 2);
766
+
set tidb_opt_fix_control='44855:on';
767
+
explain select /*+ inl_join(t1), use_index(t1, idx) */ * from t join t1 on t.a = t1.a and t1.b = 123;
with cte_192 ( col_1101,col_1102,col_1103,col_1104 ) AS ( select /*+ use_index_merge( tl6e913fb9 ) */ replace( tl6e913fb9.col_36 , tl6e913fb9.col_36 , tl6e913fb9.col_36 ) as r0 , space( 0 ) as r1 , min( distinct tl6e913fb9.col_36 ) as r2 , count( distinct tl6e913fb9.col_36 ) as r3 from tl6e913fb9 where tl6e913fb9.col_36 between 'n92ok$B%W#UU%O' and '()c=KVQ=T%-vzGJ' and tl6e913fb9.col_36 in ( 'T+kf' ,'Lvluod2H' ,'3#Omx@pC^fFkeH' ,'=b$z' ) group by tl6e913fb9.col_36 having tl6e913fb9.col_36 = 'xjV@' or IsNull( tl6e913fb9.col_36 ) ) ( select 1,col_1101,col_1102,col_1103,col_1104 from cte_192 where not( IsNull( cte_192.col_1102 ) ) order by 1,2,3,4,5 limit 72850972 );
525
+
526
+
# TestIssue58581
527
+
drop table if exists t;
528
+
create table t (id int unique key, c int);
529
+
insert into t values (1, 10);
530
+
insert into t values (2, 20);
531
+
insert into t values (3, 30);
532
+
select _tidb_rowid from t where id in (1, 2, 3);
533
+
534
+
# TestIssue59762
535
+
drop table if exists t, t1;
536
+
create table t(a int);
537
+
create table t1(a int primary key, b int, index idx(b));
538
+
insert into t values(1), (2), (123);
539
+
insert into t1 values(2, 123), (123, 2);
540
+
set tidb_opt_fix_control='44855:on';
541
+
explain select /*+ inl_join(t1), use_index(t1, idx) */ * from t join t1 on t.a = t1.a and t1.b = 123;
542
+
select /*+ inl_join(t1), use_index(t1, idx) */ * from t join t1 on t.a = t1.a and t1.b = 123;
543
+
544
+
# TestIssue20710
545
+
drop table if exists t1, t2;
546
+
create table t1(a int, b int, index idx(a, b));
547
+
create table t2(a int, b int, index idx(a));
548
+
explain select /*+ merge_join(t1) */ * from t1 join t2 on t1.a=t2.a and t2.b=t1.b;
549
+
explain select /*+ no_hash_join(t1), no_index_join(t1,t2), no_index_hash_join(t1,t2) */ * from t1 join t2 on t1.a=t2.a and t2.b=t1.b;
550
+
>>>>>>> 163c4bed8fa (planner: don't choose merge join unless there's hint or join key fully matched (#59933))
0 commit comments