ebeshero / DHClass-Hub

a repository to help introduce and orient students to the GitHub collaboration environment, and to support DH classes.
GNU Affero General Public License v3.0
27 stars 27 forks source link

Optimizing XQuery in eXist-db #759

Closed ebeshero closed 4 years ago

ebeshero commented 4 years ago

This will come up later in class as we all start working in our eXist XML database, but some of you returning students are working in eXist right now (@alnopa9 , @amberpeddicord , among others). Take a look at this advice for how to optimize your search queries to get speedy results (and put less strain on my server!): http://exist-db.org/exist/apps/doc/tuning.xml#write

I'm filing this here to keep open for when the full class gets to work in our eXist-db later this semester.

ebeshero commented 4 years ago

One thing we could start learning and teaching here (note @frabbitry !) is the fairly recent group by option available for us in XQuery 3.0. It's a shorter and more efficient way of walking through for-loops with distinct-values(). Read about it in the link above, and let's maybe start testing it a bit and see if it's a good thing to teach this spring!