What order dependencies are there for operations in a bxs file?  I am setting up an environment that populates two databases from upstream sources.  It runs queries to modify the structure somewhat, they adds an index, then calls optimize.  After that it exports to a directory for comparison.

Does order matter?  What is a good order?

CREATE DB wlc-trees ./trees
RUN ./xquery/add-wlc-verses-words.xq
CREATE INDEX ATTRIBUTE
OPTIMIZE
EXPORT ./out/wlc

SET CHOP false
SET EXPORTER indent=no,omit-xml-declaration=no
CREATE DB oshb-morphology ./morphhb/wlc
RUN ./xquery/oshb-pure-qere-reading.xq
RUN ./xquery/merge-proper-nouns-oshb.xq
CREATE INDEX ATTRIBUTE
OPTIMIZE
EXPORT ./out/oshb

Thanks!

Jonathan