Tag Info

Hot answers tagged

3

I give a full explanation of what happens with a chunk migration in the M202 Advanced course if you are interested. In general terms, let's just say that migrations are not very fast, even for empty chunks, because of the housekeeping being performed to make sure migrations work in an active system (these still happen even if nothing but balancing is ...


2

i have used PostGIS for over a decade now and I can tell you for sure that there is no match for it in the NoSQL world. how many rows do you have? how large is the thing? Mongo is definitely not going to make you happy. I am pretty sure you did something fishy on the PostgreSQL side to even consider using Mongo. Let us fix it ...


2

The write is done in-memory first and flushed to disk (asynchronously) later. Any readers accessing a document will get the in-memory copy straight away, not waiting for the flush to disk to happen (otherwise the database would be disk bound in terms of performance). The reference about locks applies to the in-memory portion, and guarantees the atomicity ...


2

Short version: use a manual reference, not a DBRef. Explanation: There is no particular benefit to the use of a DBRef beyond giving you the collection and database that the referenced document resides in. If you know the reference is only between categories and products, then that is not particularly useful. A DBRef simply contains the _id of the ...


2

So let's look at the "roles" here represented in the referenced architecture. Keep in mind, this is the "2 cent tour" of what the architecture is all about. Mongos This process is the "router" in that it acts as the interface for a "client" to connect to a sharded cluster. You can have many mongos instances, so you are not limited to "one" only. As ...


1

Yes you can with a single command: db.getSiblingDB('admin').runcommand({ movePrimary : "YourDBName", to : "shard001" }) then is important to flush configuration on all mongos (suppose all than the one that did the move, but better be safe): db.adminCommand({flushRouterConfig: 1}) If your databases are small you can do it on-the-fly, else you better plan ...


1

In my opinion if your fragmentation is not over 15-20% its not worth doing that (except if you are running out of disk space). What i would do is: 1) Add an arbiter to each replica set (optional) 2) Shutdown one of the secondaries and delete the data directory 3) Start the secondary and let it do the initial sync which removes fragmentation (at this ...


1

This is a common misconception, i.e. that yields are somehow causing the slowness. In fact they are a symptom, not a cause. Even if there is no lock contention that requires a yield (writes basically), the queries still yield when they have to page from disk. They then re-acquire the lock when a certain amount of paging is done and look to yield again if ...


1

Here are several examples of YAML configs for Linux (Windows paths and options are a little different), essentially explicitly setting some defaults and commonly used settings. First, a standalone mongod with the default port, path, journal settings - this would be the type of configuration used for local testing, with a few extras so show the general ...


1

You may want to have a look on that document http://docs.mongodb.org/manual/reference/database-references/ . In general join is not a good practice for mongodb since it does not automatically supported. You might need to nest some author attributes - if not all information - that commonly used by your find queries on the blog collection for faster lookup.


1

PostgreSQL is perfectly fine for this. You got a couple of options to make this work. First of all: PostgreSQL has a special index type for that called GIN (http://www.cybertec.at/gin-just-an-index-type/). It is perfect for full-text-search in general. The cool thing is: In the latest version of PostgreSQL there is support for a thing called jsonb. You ...



Only top voted, non community-wiki answers of a minimum length are eligible