mongodb

    Use different mongodb instances in mongoid

    14 Jan 2011

    By default, we save all the collections in one mongodb instance, or replicate/shard all of them into different mongodb instances. But what if saving a special collection into one mongodb instance, and the other collections into the other mongodb instance?

    This is what I need to do with a mongoid project several weeks before. In common we just define a mongodb instance in the config/mongoid.yml, yep, you can define only one inst...

    Read More

    Tags 


    Drop tmp collections in Mongodb

    06 Jan 2011

    I'm trying mongodb map/reduce functionality with mongoid these days. I find there is a tmp.mr.mapreduce_ddd_ddd collection created after each map/reduce operation, it's ok that these tmp collections are used to hold output of map/reduce operation.

    From mongodb document, it's said the temp collections will be cleaned up when the client connection closes or when explicitly dropped. But I never see these temp collections are dropped, when I print show collections, there are too many temp collections annoyed me, I decided to drop t...

    Read More

    Tags