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

Use exists subquery to find deleted model instance pks #791

Merged
merged 2 commits into from
Jun 3, 2019

Commits on May 30, 2019

  1. Use exists subquery to find deleted model instance pks

    In the general case, performance should be similar to the previous
    subquery. But when the queryset is filtered, a potentially costly scan
    of the model pks is avoided, greatly improving performance in models
    with many instances and revisions. Such a situation occurs in the
    `django-reversion-compare` package in
    https://github.com/jedie/django-reversion-compare/blob/0bfe214e40933e38a5e5a94f3c6d0f56de9051be/reversion_compare/compare.py#L206:
    jeremy-engel committed May 30, 2019
    Configuration menu
    Copy the full SHA
    f2db820 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f01740f View commit details
    Browse the repository at this point in the history