>
>(3) Consider deliberating choosing INTEGER PRIMARY KEY values based on
>a "Morton code" or "Z-Order curve" of the coordinates.
>(https://en.wikipedia.org/wiki/Z-order_curve) That will cause
>features that are close together geographically to tend to be close
>together within the file.
My primary key is actually the Id of the specific object in the
OpenStreetMap-database, and we also need this osm-id in the app.
I was trying just to order all rows by the "Z-Order curve"-value first
before inserting them.
for each (line in lines.ordered.by.zvalue)
{
insert line into lines
insert line into lines_rtree
}
But this doesn't seem to work.
At least, I don't see any improvements in page-usage.
So is it just the value of the primary key controlling in which page the
row is stored?
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users