[06:41:04] <KekSi> like db.someCollection.findOne()['myNewField']=10 and see if you can still do something with it
[07:39:19] <headphase> i have a flask application, using flask_mongoengine for the db. my db is hosted at mLab. why is it that when i try to query the db, i get the error: "pymongo.errors.OperationFailure: database error: not authorized for query on heroku_dptwtq1j.web_config", even though i am logged in as the admin user?
[07:39:24] <headphase> on another application, im also able to query the db just fine, except that application is not using flask_mongoengine, it's using motor.motor_asyncio. for some reason flask_mongoengine hates me? or am i missing something?
[07:48:44] <wwwi> i have 2 questions. First, are nosql dbs faster than sql dbs? And second, isn't difficult to work without schema?
[07:49:26] <wwwi> Actually, i have a third question too. can you easily add additional db servers if you want?
[08:50:00] <ams__> naf: Yes that does look like the code, but I'm not sure how to fix my problem from that
[09:10:54] <KekSi> wwwi: that all depends - in some use cases nosql servers are faster, working without a schema is obviously very easy (because the db just eats whatever you throw at it) and depending on your db of choice it can range from very easy to very hard to add more (either replicas or cluster members9
[09:11:38] <KekSi> depends on what you want to scale: read speed -> add replicas (or a cache), write speed -> cluster members (in case of mongodb by sharding)
[09:12:43] <KekSi> the structure is what makes nosql fast
[11:19:28] <toonsev> Hey guys is there a feature in bson to use the dot notation to drill down documents like you do in the mongodb shell?
[11:22:05] <toonsev> For example: Object value = bson.get("a.b") would be a short notation for Object value = bson.get("a", Document.class) != null ? bson.get("a", Document.class).get("b", Document.class) : null;
[11:22:33] <toonsev> I wrote a wrapper class for this but would like to know if there is already something that exists for this :)
[12:07:21] <ams__> So any pointers for forcing a sync? My mongo 3.2 instance just won't sync from my mongo 3.0 instance
[12:08:26] <ams__> I can consistently get this erorr: https://www.irccloud.com/pastebin/vqls11jL/
[14:51:30] <Guest4187> what is the differece between mongodump and mongoexport
[14:55:03] <Derick> mongodump dumps into .bson files (binary format) and can be used with mongorestore
[14:55:21] <Derick> mongoexport dumps into .cvs or .json format, and can be used with mongoimport
[14:57:27] <StephenLynx> in general its advised to use mongodump, if you can.
[14:57:44] <StephenLynx> since export has to do some wizardry to export some formats.
[15:04:04] <xrated> Hi everyone, we're currently load testing our new application. We've optimized the individual collections and implemented the recommended performance tweaks from documentation. We're still hitting read limits however without using all resources available on the box. My googling points us towards switching to a sharded set.
[15:04:17] <xrated> Is sharding the best approach to increase read capacity?
[15:04:46] <xrated> (I know there's a whole lot of missing details and vagueness in there, was looking for other people's experience in similar situations)
[15:05:29] <Derick> are you using one data node, or more right now? For example, throught a replicaset?
[15:06:01] <xrated> It's a replicate set with 1 primary and 2 secondaries
[15:06:27] <Derick> did you play with reading from secondaries? (i.e., is lag OK?)
[15:07:18] <xrated> We were looking at that and the emphasis on eventual consistency made us do a double-take. MySQL replication is asynchronous and master/slave is still recommended, but Mongo's documentation seems very against using secondaries for read.
[15:07:24] <xrated> lag in the matter of a few ms is OK
[15:08:08] <Derick> yeah, loading your secondaries with reads, can actually make the lag more pronounced. Secondaries are mostly to provide redundancy and failover.
[15:08:17] <Derick> I believe we recommend sharding for read/write scaling.
[15:08:29] <Derick> But, you need to be really careful how you pick a sharding key.
[15:09:00] <Derick> You don't want to end up having to hit *every* shard on range queries, or something like that.
[15:09:23] <xrated> is there a standard sharding key to use when using object ids?
[15:09:29] <xrated> Or is it dependant on your data set
[15:09:39] <Derick> How do you need to look up documents?
[15:09:45] <Derick> ranges, one by one, something else?
[15:10:01] <xrated> Normally one-by-one or with an in-clause