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

Make "order" field an index and use Max aggregate to find next order value. #7

Merged
merged 2 commits into from
Oct 25, 2013

Conversation

fladi
Copy link
Contributor

@fladi fladi commented Oct 22, 2013

The "order" field should be a database index for performance reasons. Using the MAX(order) SQL aggregate should also improve performance for larger datasets.

@cypreess cypreess mentioned this pull request Oct 22, 2013
@bfirsh
Copy link
Member

bfirsh commented Oct 25, 2013

Thanks!

@bfirsh bfirsh closed this Oct 25, 2013
@bfirsh bfirsh reopened this Oct 25, 2013
bfirsh added a commit that referenced this pull request Oct 25, 2013
Make "order" field an index and use Max aggregate to find next order value.
@bfirsh bfirsh merged commit f412b61 into django-ordered-model:master Oct 25, 2013
@fladi fladi deleted the aggregate branch November 4, 2013 12:50
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

Successfully merging this pull request may close these issues.

None yet

2 participants