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

Do not automatically add "distinct" if query.first() used #90

Closed
socketpair opened this Issue Oct 26, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@socketpair

socketpair commented Oct 26, 2014

This will probably speedup query, since SQL-engine typically apply LIMIT as the last action, not all engines are smart enough to eliminate distinct logic if only one record requested. So, Pony should be smarter. But if someone adds SKIP 42 LIMIT 1, Pony should use distinct anyway.

Original discussion: http://doc.ponyorm.com/queries.html#comment-1654734639

@socketpair

This comment has been minimized.

Show comment
Hide comment
@socketpair

socketpair commented Oct 26, 2014

2014-10-27 02 33 42
2014-10-27 02 33 54

@kozlovsky

This comment has been minimized.

Show comment
Hide comment
@kozlovsky

kozlovsky Oct 28, 2014

Member

Fixed, now Pony implicitly adds .without_distinct() before .first()

Member

kozlovsky commented Oct 28, 2014

Fixed, now Pony implicitly adds .without_distinct() before .first()

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