Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Monitor or trace slow queries on rethinkdb cluster.
r.db("rethinkdb").table('jobs')
.filter(function(j){
return j('type').eq('query')
.and(j('duration_sec').gt(0.001))
.and(j('info')('query').match('jobs').eq(null))
.and(j('info')('query').match('rethinkdb').eq(null));
})
.changes();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment