NoSQL Zone is brought to you in partnership with:

Eric is an artist and storyteller who boasts his first computing experience juggling drivers into memory to run as many DOS games as possible without rebooting. Since then he has become a creative, patient reverse engineer who operates on the basic premise that something never has to be the way that it is. Eric has a B.S. in Computer Science from the Georgia Institute of Technology and his experience in the ETL layer across a broad range of industries has instilled in him an appreciation for semantics and the belief that all of mankind's problems are related to our adherence to inaccurate representations of reality. Eric is a DZone MVB and is not an employee of DZone and has posted 8 posts at DZone. You can read more from them at their website. View Full User Profile

Dex 0.5: Weighted Index Recommendations for MongoDB

10.13.2012
| 2977 views |
  • submit to reddit

Greetings, adventurers!

I am happy to announce the latest version of Dex, MongoLab’s Index Bot. With version 0.5, we’re declaring Dex halfway-there in terms of major features. The most important and convenient improvements in this version are Weighted Index Recommendations and support for MongoDB 2.2 log files.

If you haven’t given Dex a try yet, check out the README and sudo pip install dex to get started. Even if you are already a Dex user, I highly recommend you revisit the readme, as Dex’s output has changed.

Now when you run Dex, Dex compiles statistics for its recommendations, and provides those in its output. In contrast to prior versions, this gives a weight to each suggested index, clearly identifying the worst offenders.

Here’s a rundown of major changes:

  • Weighted Recommendations – For each recommendation, Dex tallies the number of affected queries, the total time consumed by those queries, and the average time for a single query. Note that Dex keeps subtotal statistics for each unique query pattern that prompted a given recommendation. Subtotals are available in –verbose/-v mode only.
  • Output changes – We’ve modified Dex’s output for the purposes of readability and convenience, in the following ways:
    • By default (i.e., not in –watch/-w mode), Dex no longer provides runtime output. Dex reads the entire profile collection or log file and then outputs one set of full results.
    • In –watch/-w mode, Dex still provides runtime output, periodically printing all recommendations with up-to-date statistics.
    • The shell command suggestion is removed from default output in favor of concise, weighted index recommendations. The shell command is still available in –verbose/-v output, but is no longer included by default.
  • Support for MongoDB 2.2 log files – While Dex has supported MongoDB 2.2 in –profile/-p mode, updates to Dex’s log file regexes now support recent updates to the MongoDB log file line format.

For more information about Dex, check out Introducing Dex. As always, good luck out there!

Sincerely,
Eric@MongoLab

 

 

 

Published at DZone with permission of Eric Sedor, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)