Just tweaked a few of the indexes and added a couple. Some high level comments:
I've proposed composite indexes for levelpath and sequence. This works because we rarely, if ever, query sequence without also specifying a levelpath. Note that this composite index also helps if you are just querying levelpath without specifying a sequence. (But it is useless if you want to query sequence without specifying levelpath. Order matters.)
Note that I used a composite for the confining margins with levelpath and side. I think this presumes you symbolise the sides differently. Might help Q display the symbology quicker.
I HAVE NOT RUN THIS CODE. NEEDS TESTING.
Just tweaked a few of the indexes and added a couple. Some high level comments:
I've proposed composite indexes for levelpath and sequence. This works because we rarely, if ever, query sequence without also specifying a levelpath. Note that this composite index also helps if you are just querying levelpath without specifying a sequence. (But it is useless if you want to query sequence without specifying levelpath. Order matters.)
Note that I used a composite for the confining margins with levelpath and side. I think this presumes you symbolise the sides differently. Might help Q display the symbology quicker.