标签:
给出两个表,A和B,A和B表的数据量,
for i in A for j in B if j.id == i.id then ....
for i in B for j in A if j.id == i.id then ....
Duration | Fetch | Rows | SQL | |
exists | 0.17 | 6.2 | 924 | SELECT * FROM user u where exists (SELECT 0 FROM plan p where p.user_id=u.user_id ) |
in | 0.01 | 0.0 | 924 | SELECT * FROM user u where user_id in (SELECT user_id FROM plan) |
标签:
原文地址:http://www.cnblogs.com/healerkx/p/4758295.html