Solutions

Stay on top of everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up

Learn

Stay on top of everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up

Community

Stay on top of everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up

Company

Stay on top of everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up

How to write fast queries (by leveraging indexes)

by Evan Lenz

In my last article on how indexing makes XPath fast, I described the general role that MarkLogic's Universal Index plays. I also promised to show you how to write searchable (and thus fast) expressions. That's what this post is about.

For the Developer Lounge at MLUC '11, I created a tutorial on "Query Tuning Basics" which walks you through a series of simple XQuery examples (27, to be precise) that you can enter into CQ, using XML data from weather.gov.

In this tutorial, you'll learn about these closely related tools:

  • xdmp:query-meters()
  • xdmp:estimate()
  • xdmp:plan()
  • xdmp:query-trace()

Most importantly, you'll see how these tools make it easy for you to ensure that the expressions you write are evaluated by MarkLogic Server in a way that fully leverages its indexes. In other words, you'll learn how to write scalable, blazing fast queries. Just remember: with great power comes great responsibility.

Are you ready to get started? Then download the PDF tutorial and come back here to post any questions you might have (as a comment on this post).

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.