请问怎么提高查询速度啊?
网上说索引可以优化,但我没学过sql,不知道索引怎么用
这个表里面已经有35w条数据,我想从里面查询数据,
原本的方法效率十分低下
PreparedStatement pst1 = (PreparedStatement) con.prepareStatement("select UserID from userrelation where id=?");
PreparedStatement pst2 = (PreparedStatement) con.prepareStatement("select Fans from userrelation where id=?");
PreparedStatement pst3 = (PreparedStatement) con.prepareStatement("select Follows from userrelation where id=?");
求教啊!