PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Friday the 26th of May, 2017

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:11:39] <MacWinner> does having a projection in your query affect index selection?
[06:11:22] <_gm> Hi everyone, i am trying to use variable in aggregation pipeline, here is my $group pipeline: { "$group" : { _id: { telco: "$telco", sc: "$sc"}, count: {$sum: 1}, ts: {$first: '$timestamp'} }},
[06:12:11] <_gm> here, instead of ts: {$first: '$timestamp'} i want to use value of a variable: $start which i defined just above the aggregation pipline, var start = new Date(new Date().setDate(new ISODate().getDate() -1 )); start.setUTCHours(5, 0, 0, 0);
[06:12:33] <_gm> i can use vars in $match pipeline but not inside the $group
[08:47:34] <janat08> has anyone considered justing creating fields instead of array if you can't use index anyway?
[08:47:44] <janat08> and then using exists?
[16:47:27] <abeach> hello, when making a change to a deployment in Ops Manager, the agent logs "Slept until has other primary" and" Running step 'Start' as part of move 'ChangeExePath'". The mongod process is started by runit, instead of Upstart, init.d script or systemd because it is in a docker container. Is there a way to cause the Automation Agent to be able to stop and restart mongodb with the new path...
[16:47:29] <abeach> ...when not using Upstart or other typical task / daemon management tools?
[16:48:05] <abeach> I mean, the agent continuously logs those messages and the deployment change timesout in Ops Manager
[16:53:48] <nettoweb__> Hello guys, I juts added this to my schema: timestamp: true but now I'm wondering how to read this data in my frontend app. because I dont have access to ObjectId. I have to send a field date in returned json?
[18:50:46] <AtomicB0mB> Hi, is there a way to get a random document in my collection? A more efficient way than db.find().limit(1).skip(_rand() * db.Collection.count() ) ?
[18:55:39] <AtomicB0mB> just saw that using aggregate with $sample solves my problem =)
[20:57:42] <abeach> I figured it out. I needed to stop using runit and stop getting led astray by "Add Existing MongoDB Deployment"
[22:18:14] <Frenchiie> Hi
[22:20:17] <Frenchiie> I read this blog post about the advantage of mongodb over a relational db but i'm not convinced It talks about how in mongodb instead of having multiple tables and doing a join like in a relational database, the related data can be in the same document and only needs 1 query. However you could do the exact same thing in a relational database where you fit everything into one table and have redundancy. Where is the benefit? https:/
[22:21:23] <Frenchiie> also it seems to me that the example given was specifically made to the point so that the documents or tables related don't have duplicates where normalization is needed. Doesn't seem like a fair example to me but regardless if we don't need to normalize as per the example given why have more than 1 table?
[22:23:07] <Frenchiie> maybe i'm just not understanding the blog post but i don't see the benefit that mongodb provides in this specific aspect, where having all the related data in one document is better than that of using a relational database, given that you could use a single table.
[22:44:31] <Frenchiie> anyone ?
[23:33:18] <Frenchiie> anyone?