table1
row_id row_one row_two
1 1 5
2 1 5
3 2 5
4 2 5
5 2 6
table2
row2_id row2_one row2_two
1 1 somevalue
2 2 somevalue2
"select distinct row_one from table1 where row_two=5"
结果结果结果结果结果
row_one
1
2
之后,我想要选择
select * from table2 where row2_one=1
select * from table2 where row2_one=2
i want select with one query. i am trying this query
select * from table2 where row2_one in (select distinct row_one from table1 where
row_two where row_two=5)
but it took 8s
Showing rows 0 - 14 ( 15 total, Query took 8.3255 sec)
why is it so slow. i want select faster. please help me!