Created
June 21, 2021 13:00
-
-
Save spetrunia/72137799bdc298b332dd3cfe4de999e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table t1 ( | |
key1 int, | |
col1 int | |
); | |
insert into t1 select a, a from one_m; | |
create index t1_key1 on t1(key1); | |
create table t2 ( | |
key1 int, | |
col1 int | |
); | |
insert into t2 select a, a from one_m; | |
create index t2_key1 on t2(key1); | |
analyze; | |
explain SELECT * FROM | |
t1 LEFT JOIN t2 on (t1.key1<100 AND t2.key1=t1.col); | |
explain | |
select * | |
from t1 inner join t2 on (t1.key1<100 and t2.key1=t1.col); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment