XDATA-Year-2/twitter-owf-geomap-instrumented — pull request #6 by jeffbaumes (2014-07-25 03:13:24+00:00)
Title: Query speedup

All types of queries should respond in the 1-3 second range now at any zoom level. This required much more finesse than I expected or wanted -- I needed to use hint() to make mongodb use certain indices in certain situations. As @ronichoudhury suggested we are now using custom services instead of the generic mongo.py.

Caveat 1: Time slicing is currently nonfunctional but I didn't think it was too big a deal since we weren't sure of its utility anyway. I think we could add it back if we needed to.

Caveat 2: Changing the limit may change the "sweet spot" of when to switch indices, so best not to make it too different than the default 1000.

Caveat 3: This will pull in @ronichoudhury #5 and #4 since it is based on them.

Caveat 4: it changes the default collection to twitter_sa_2. The old twitter_sa collection does not perform nearly as well even though it seems to have the same indices -- perhaps if indices were rebuilt it would perform about the same but I didn't want to mess with it.