about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2026-08-26 14:39:32 +0100
committerArun Isaac2026-08-26 14:39:43 +0100
commit7073e5cc0860ccbe739f97eaa116d10b639a3005 (patch)
treed80b819113bdde3c80676e697df554b1758adf16
parent7a1dc231e0139977c7a08da57c1931f59798ee5a (diff)
downloaddomagi-7073e5cc0860ccbe739f97eaa116d10b639a3005.tar.gz
domagi-7073e5cc0860ccbe739f97eaa116d10b639a3005.tar.lz
domagi-7073e5cc0860ccbe739f97eaa116d10b639a3005.zip
Re-order extracted path_segment table for optimal access.
-rw-r--r--domagi/domagi.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/domagi/domagi.py b/domagi/domagi.py
index e2bf457..20f5837 100644
--- a/domagi/domagi.py
+++ b/domagi/domagi.py
@@ -262,7 +262,9 @@ def extract(con, outfile, segment_name, path_range, steps, threads, progress):
     INSERT INTO subset_db.path_segment
     SELECT path_id, segment_id, segment_orientation, start, "end"
     FROM selected_segment
-    INNER JOIN path_segment ON path_segment.segment_id=selected_segment.id;
+    INNER JOIN path_segment ON path_segment.segment_id=selected_segment.id
+    -- Re-order similar to post-import.sql for optimal access.
+    ORDER BY path_id, start, "end";
     
     INSERT INTO subset_db.path
     SELECT id, ANY_VALUE(name)