-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The nearest postcode lookup performance reduced dramatically when tried with Postgres 9.6 and PostGIS 2.3. This commit updates the query to use the ‘<->’ centroid distance operator instead, which makes better use of the geoindex and is much faster to execute. Handily, the work @dracos did to introduce the TrigramDistance function into Django 1.10 was easily adaptable for this purpose, as the operator used is the same.
- Loading branch information
Showing
1 changed file
with
17 additions
and
3 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