Non-Query Optimization Presentation

posted by David on

Beyond standard query optimization in MarkLogic, scalability and performance can often be dramatically improved by using strategies or patterns that avoiding making database queries.

The demo is the presentation given at the 2011 MarkLogic Conference.

Demo

Here is an example tip from the presentation:

Instead of querying the database on every transaction to get configuration information, in new MarkLogic Server 4.2 fashion, put the config data in server fields which are pinned in memory that are instantly available to any transaction in the server.

Putting it in:

let $config := <someConfiguration enabled="true"/>
return xdmp:set-server-field('myConfigName', $config)

Getting it back out:

let $config := xdmp:get-server-field('myConfigName')

To REALLY SCREAM, put lookup data into a map using the map:* functions available in MarkLogic Server.

More to come...

Leave a comment

blog comments powered by Disqus