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

Add limit statement #15

Open
MassonNN opened this issue Jun 27, 2023 · 0 comments
Open

Add limit statement #15

MassonNN opened this issue Jun 27, 2023 · 0 comments
Assignees
Labels
Classic invalid This doesn't seem right

Comments

@MassonNN
Copy link
Owner

Rationale

We don't really need to get all rows from database if we want to get exactly one row with sqlalchemy methods. This has bad effect for database performance and need to be fixed.

Where occurs

return (await self.session.execute(statement)).one_or_none()

How to fix

Add limit statement

@MassonNN MassonNN self-assigned this Jun 27, 2023
@MassonNN MassonNN added invalid This doesn't seem right Classic labels Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Classic invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant