[openstreetmap/openstreetmap-website] Add a gpx_tracks table and convert trace points into linestrings (PR #7348)

Tom Hughes notifications at github.com
Tue Sep 22 18:01:39 UTC 2026


@tomhughes commented on this pull request.



> @@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class CreateGpxTracks < ActiveRecord::Migration[8.1]
+  def change
+    create_table :gpx_tracks, :primary_key => [:gpx_id, :trackid, :segment] do |t|

But postgres can potentially use both indexes at once to do a bitmap index scan - basically it would do the gist index scan and build a bitmap of matching rows then read the other index filtering the rows it matches against the bitset.

I don't know how well that will work in this case but in principle it's something postgres can do.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7348#discussion_r4074766475
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/7348/review/5281771449 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260922/7c4e34a6/attachment-0001.htm>


More information about the rails-dev mailing list