Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

优化建议 #334

Closed
liumy001 opened this issue Jan 3, 2019 · 2 comments
Closed

优化建议 #334

liumy001 opened this issue Jan 3, 2019 · 2 comments

Comments

@liumy001
Copy link

liumy001 commented Jan 3, 2019

1,分页查count拼sql建议不要用子查询直接切割就好,有order by建议去掉order by查count没必要。
2,建议查分页和查list采用异步方式,最起码要有一个开关

@abel533
Copy link
Collaborator

abel533 commented Jan 3, 2019

默认不用子查询,除非有聚合函数或group by。
默认会去 order by。

异步方式可以考虑,目前的逻辑中,如果 count = 0,就不会继续查询。

@liumy001
Copy link
Author

liumy001 commented Jan 3, 2019

感觉查询时候还是有数据时候多,异步时候即使多查了一次,对性能影响并不大,所以建议增设分页时候异步开关,让用户自己选择。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants