S
soul
Unregistered / Unconfirmed
GUEST, unregistred user!
select count(*) from letters
where id in( SELECT DISTINCT Parent FROM letters WHERE (Parent <> 0) AND (UserFrom = 'yysun' ) ) and parent=0 and Status < 2
select * from letters
where id in( SELECT DISTINCT Parent FROM letters WHERE (Parent <> 0) AND (UserFrom = 'yysun' ) ) and parent=0 and Status < 2
近来又发现一个问题,我观察一个sql的执行效率。
结果发觉第二句sql反而快,不是快一点点,而是20倍,晕的我不知道怎么办好了。
where id in( SELECT DISTINCT Parent FROM letters WHERE (Parent <> 0) AND (UserFrom = 'yysun' ) ) and parent=0 and Status < 2
select * from letters
where id in( SELECT DISTINCT Parent FROM letters WHERE (Parent <> 0) AND (UserFrom = 'yysun' ) ) and parent=0 and Status < 2
近来又发现一个问题,我观察一个sql的执行效率。
结果发觉第二句sql反而快,不是快一点点,而是20倍,晕的我不知道怎么办好了。