如何建立适当的索引 用的mysql 1、String sql="select sum(b_winningCount) from lottery_bet,lottery_strategy where to_days(`b_date`) = to_days(now()) and b_userid = " + userId+" and s_stype="+stype+" and b_strategyid=s_sid"; 2、 String sql="select sum(b_winningCount) from lottery_bet,lottery_strategy where b_userid = " + userId+" and s_stype="+stype+" and b_strategyid=s_sid"; 3、 String hql = "From Haoma_Sh11x5_KaiJiang where qishu=(select max(qishu) from Haoma_Sh11x5_KaiJiang)";