Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

climbingTiles: exploration #2 – proper pg client + MVT z10 encoding #811

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

zbycz
Copy link
Owner

@zbycz zbycz commented Nov 26, 2024

https://app.xata.io/workspaces/osmapp-tvgiad/dbs/db_with_direct_access:us-east-1/branches/main/tables/climbing_tiles

Overpass elements: 168427
Records: 22288
Query length: 7853932 chars
Duration of query: 9702 ms

## with geohash 9

Overpass elements: 168427
Records: (22288)
SQL Query length: 8143684 chars
Done.
Duration: 13089 ms
 GET /api/climbing-tiles/refresh 200 in 15376ms

Geohash

https://www.movable-type.co.uk/scripts/geohash.html

u
Latitude: 67.50000±22.50000, Longitude: 22.50000±22.50000
u2
Latitude: 47.81250±2.81250, Longitude: 16.87500±5.62500
u2f
Latitude: 49.92188±0.70313, Longitude: 14.76563±0.70313
u2fs
Latitude: 50.00977±0.08789, Longitude: 14.94141±0.17578
u2fsm
Latitude: 49.98779±0.02197, Longitude: 15.00732±0.02197
u2fsmq
Latitude: 50.00153±0.00275, Longitude: 15.00183±0.00549
u2fsmq4
Latitude: 49.99947±0.00069, Longitude: 14.99977±0.00069
u2fsmq4x
Latitude: 50.00007±0.00009, Longitude: 14.99994±0.00017
u2fsmq4xj
Latitude: 50.00000±0.00002, Longitude: 15.00001±0.00002

Perf

  • vercel:

    • refresh pg - 70 secs
    • climbingTileXata WHERE type='group' AND geohash = 'u2' 829ms 2484 640ms 606ms
    • climbingTilePg WHERE type='group' AND geohash = 'u2' 256ms 2484 320ms 258ms
  • geohash LIKE 'u2%' -> 12k -> 2.2 sec

  • type='group' AND geohash LIKE 'u2%' -> 2k -> 2.7 sec, 1.9sec

XATA client:
climbingTile 1879.7577090000268 2484
GET /api/climbing-tiles/tile 200 in 1928ms

PG client:
climbingTile 2070.8319999999367 2484
GET /api/climbing-tiles/tile 200 in 2660ms

MVT

tile features MVT GeoJSON img
10/555/347 vrchlice 567 30kB 146 kB (15kB gz)
10/552/348 Roviště 1147 61kB 295 kB (32kB gz)

Copy link

vercel bot commented Nov 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
osmapp ❌ Failed (Inspect) Jan 11, 2025 2:24pm

@zbycz zbycz changed the title climbing: cache climbing data in postgre + tiling climbingTiles: exploration #2 Jan 11, 2025
@zbycz zbycz changed the title climbingTiles: exploration #2 climbingTiles: exploration #2 – proper pg client + MVT z10 encoding Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant