mysociety / mapit

A web service to map postcodes to administrative boundaries and more
Other
269 stars 88 forks source link

Specify the CTE should be materialized. #393

Closed dracos closed 2 years ago

dracos commented 2 years ago

In PostgreSQL 12, the default behaviour is to inline basic CTEs such as this one, which in this case decreases the performance of the query.

codecov[bot] commented 2 years ago

Codecov Report

Merging #393 (c9be442) into master (b5172f6) will increase coverage by 0.00%. The diff coverage is 75.00%.

@@           Coverage Diff           @@
##           master     #393   +/-   ##
=======================================
  Coverage   71.85%   71.86%           
=======================================
  Files          39       39           
  Lines        2299     2303    +4     
=======================================
+ Hits         1652     1655    +3     
- Misses        647      648    +1     
Impacted Files Coverage Δ
mapit/models.py 84.16% <75.00%> (-0.17%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b5172f6...c9be442. Read the comment docs.