Skip to content

Commit

Permalink
chore: improve mvt query performance by reducing vector tile metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisgsmith committed Jan 4, 2025
1 parent 6128dec commit cb2b8e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion api/internal/db/instrument.sql_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion api/queries/instrument.sql
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ mvtgeom as (
select
row_number() over(order by id) as fid,
ST_AsMVTGeom(t.geometry_3857, bbox.tile_env::box2d, 4096, 256, false) as geometry,
t.*,
t.id,
t.status,
t.name,
t.type,
t.icon,
ST_AsGeoJSON(t.geometry) as geometry
from v_instrument_raw t, bbox
where ST_Intersects(t.geometry_3857, bbox.tile_env)
Expand Down

0 comments on commit cb2b8e0

Please sign in to comment.