APIJSON icon indicating copy to clipboard operation
APIJSON copied to clipboard

4.8.3 JOIN 性能优化前后对比

Open TommyLemon opened this issue 4 years ago • 0 comments

经过 https://github.com/Tencent/APIJSON/commit/00dae1b6bfa0de09b3e2465f62319c278524f375 和 https://github.com/Tencent/APIJSON/commit/5d59b3529274d1542bdef90dc78e888c7af8d0f1 这两次优化, 4.8.3 对比 4.8.0 在 Log.DEBUG = true(开启日志)的情况下:

Comment LEFT JOIN User 100 项的列表耗时降低至原来 85.7%,性能提升 17% 至原来 1.17 倍; Comment LEFT JOIN User LEFT JOIN Moment 100 项的列表耗时降低至原来 82.6%,性能提升 21% 至原来 1.21 倍; 朋友圈 Moment LEFT JOIN User 100 项嵌套 Comment LEFT JOIN User 6 项的两层列表耗时降低至原来 94.5%,性能提升 6% 至原来 1.06 倍。

如果每页数量更大或被 JOIN 的副表字段更多,则提升会更加明显。

TommyLemon avatar Jan 09 '22 15:01 TommyLemon