select * from tw_stock_d where t_date='20160810'
2.08 seconds
select * from tw_stock_d where t_date='20160623'
2 seconds
select * from tw_stock_d where t_date='20160810' union all select * from tw_stock_d where t_date='20160623'
3 seconds
select * from (select * from tw_stock_d where t_date='20160810') a join (select * from tw_stock_d where t_date='20160623') b on a.stock_code = b.stock_code
14 sconds
select * from (select * from tw_stock_d where t_date='20160810') a join (select * from tw_stock_d where t_date='20160623') b on a.stock_code = b.stock_code or a.stock_code = b.stock_code
12 seconds
select * from (select * from tw_stock_d where t_date='20160810') a join (select * from tw_stock_d where t_date='20160623') b
on a.stock_code = b.stock_code
union all
select * from (select * from tw_stock_d where t_date='20160810') a join (select * from tw_stock_d where t_date='20160623') b
on a.stock_code = b.stock_code
25 second
select * from (select * from tw_stock_d where t_date='20160810') a join (select * from tw_stock_d where t_date='20160623') b
on a.stock_code = b.stock_code
union
select * from (select * from tw_stock_d where t_date='20160810') a join (select * from tw_stock_d where t_date='20160623') b
on a.stock_code = b.stock_code
75 seconds
2.08 seconds
select * from tw_stock_d where t_date='20160623'
2 seconds
select * from tw_stock_d where t_date='20160810' union all select * from tw_stock_d where t_date='20160623'
3 seconds
select * from (select * from tw_stock_d where t_date='20160810') a join (select * from tw_stock_d where t_date='20160623') b on a.stock_code = b.stock_code
14 sconds
select * from (select * from tw_stock_d where t_date='20160810') a join (select * from tw_stock_d where t_date='20160623') b on a.stock_code = b.stock_code or a.stock_code = b.stock_code
12 seconds
select * from (select * from tw_stock_d where t_date='20160810') a join (select * from tw_stock_d where t_date='20160623') b
on a.stock_code = b.stock_code
union all
select * from (select * from tw_stock_d where t_date='20160810') a join (select * from tw_stock_d where t_date='20160623') b
on a.stock_code = b.stock_code
25 second
select * from (select * from tw_stock_d where t_date='20160810') a join (select * from tw_stock_d where t_date='20160623') b
on a.stock_code = b.stock_code
union
select * from (select * from tw_stock_d where t_date='20160810') a join (select * from tw_stock_d where t_date='20160623') b
on a.stock_code = b.stock_code
75 seconds