How will you most frequently query the data?
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb
Word defininitely by word.
For books can you share:
1. Frequency of insert/update
2. Relative frequency of queries on created_at and id and query volume overall
3. Data distribution: how many values of created at are there, how many results do you expect queries to return, etc
Thanks,
-- Max
Id sounds like the right bet.
How you assign your ids (random/increasing/mixture matters too.
How many are you adding each day/second? How big total is this collection?
-- Max
The native id assignment should be fine then.
Thank so much Max I'll pay attention you. I'll use id as shard key in this table.
because to use a compund key is possible? i dont know. And it could be a better solution that id only?
Thanks a lot.
If you gave Sphinx the created_at as well as the id you could use a compound key of created_at, id for both queries.
But if feeding sphinx is a batch job that runs daily and has to pull the whole db, it may not help much to try do get each block of that to execute on a single server, and the sphinx indexes would likely get bigger so I am trying to be practical and optimize your system overall.
Can you explain a bit more about how you feed the extract to sphinx?
-- Max