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

a default .limit(10000)? #389

Open
cyjake opened this issue May 17, 2023 · 2 comments
Open

a default .limit(10000)? #389

cyjake opened this issue May 17, 2023 · 2 comments

Comments

@cyjake
Copy link
Owner

cyjake commented May 17, 2023

tbh, it's quite easy to forget to add limit clause when querying data from database. The query might work well in local or test environment, but go wild in production because large tables happen.

is it necessary to add an option to be able to set a default .limit(10000) when selecting records from database?

@JimmyDaddy
Copy link
Collaborator

I think this option should be left to the users to decide, as querying 10000 rows of non-wide tables should not cause any significant performance issues. It could perhaps be implemented as a configuration item.

@cyjake
Copy link
Owner Author

cyjake commented May 18, 2023

yep, it should only take effect if user specifically opt it in

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

No branches or pull requests

2 participants