forked from jazzband/django-silk
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize CRYPT computations (issue jazzband#1)
Since password checks are incredibly expensive, they should always be paired (AND) with a condition that selects a very small number of records (ideally just one). However, the Postgres query analyzer isn't capable of properly optimizing the checks so that the crypt calculations are done at the end (on the smallest number of records). This changes the grammar to enforce users to always AND a password check with another (complex) condition, as well as changing the SQL generator to produce a query that performs the CRYPT checks on the result of the AND term.
- Loading branch information
1 parent
84712fe
commit 9bc2709
Showing
1 changed file
with
37 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters