Demo, all content is generated
Review request

Birdwatching log with 40k sightings, the map page takes nine seconds

Open · 188 views · asked by ines_data · edited

Repo or live app

github.com/inesferreira/birdlog

Unsure about: Performance

Personal project that got out of hand: 40k rows in sightings, each with a species, a point and a date. The map fetches everything in the current bounding box and draws markers. Query is where lat between ? and ? and lng between ? and ?. No indexes beyond the primary key. Nine seconds on the first load, faster after.

Comment
A between on lat and lng with no index is a sequential scan every time. PostGIS with a GiST index on a geography column, and cluster the markers on the client. postgres_pete · edited
PostGIS it is. Will report back. ines_data · edited

Activity

24 helpers notified