Question about Mongo DB scaling (indexes affect "excellent" performance)?

I use Mongo to daily store all the "ticks" of a set of approximately 40 equity. These ticks contain information about the transaction (a document containing the price and volume) and information about the book (a more complex document containing the offer to buy). The value of the order is about 5 thousand transactions + 20 thousand books * 40 shares per day. The document is indexed both by value (name of equity) of the insertion date, and by time of day. After a week of collection, one of my queries no longer scales: finding a specific date takes a lot of time. So I decided to have a special document, just to say that there is a “collection” for a certain day, is this the right approach? In addition, is it correct to collect things as a separate small document or is it better to collect ticks as an array in a share document?

Thanks everyone!

By the way, this question is a consequence of this: Using mongodb to store intraday capital data

Addition: even if I speak directly (on the console)

db.books.ensureIndex({dateTag:1})
db.books.distinct("dateTag")

he answers slowly. Therefore, perhaps the best question is: does the index affect performance distinct?

Addendum After upgrading to 1.8.2, the behavior will be the same.

+5
source share
3 answers

Does the index affect excellent performance?

This is true, however, there is no “explanation plan”, so this can only be confirmed with documents / code.

The document is indexed by the sign (name of equity) of the insertion date, time of day

100% , . , . , .

, , :

  • ( )

" ". , . , , , .

+2

, " " , MongoDb 24 000 . ( , ).

, , ? , , .

+1

All Articles