Skip to content

Commit

Permalink
Add a missing index for better map performances
Browse files Browse the repository at this point in the history
  • Loading branch information
niconoe committed Jul 26, 2024
1 parent 81898fa commit ff2fcd8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Current (unreleased)

- Another map performance improvement (missing index)

# v1.7.5 (2024-07-25)

- Fix a compatibility issue with Windows platform (data import script). Thanks, @sronveaux!
Expand Down
7 changes: 6 additions & 1 deletion dashboard/views/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,13 @@ def create_or_refresh_single_materialized_view(hex_size_meters: int):
) WITH NO DATA;
REFRESH MATERIALIZED VIEW hexa_$hex_size_meters;
CREATE INDEX IF NOT EXISTS hexa_$hex_size_meters_idx ON hexa_$hex_size_meters USING gist (location);
"""
).substitute(hex_size_meters=hex_size_meters)
).substitute(
hex_size_meters=hex_size_meters,
hex_size_meters_idx=f"{hex_size_meters}_idx",
)
)

j = JinjaSql()
Expand Down

0 comments on commit ff2fcd8

Please sign in to comment.