[02:24:37] <jamiel> Hi all, db.serverStatus() is reporting 65 open connections. Could anyone recommend a way to debug where these are coming from? Currently there is little to no utilisation on my application, although I do have replication enabled to a single secondary node.
[06:22:02] <jp-home> can I update the one with mean 85 only like: db.students.update( { _id: 4, "grades.grade": 80, "grades.mean": 85 }, { $set: { "grades.$.std" : 6 } } )
[08:27:52] <akske> hi guys. i am using express with the native mongo driver. i connect via the connect() method. how do i switch to another database after the connection has been established?
[08:44:20] <darius93> mark___: using mongoose would help structure the collections better
[09:21:55] <akske> the problem i have is, i have to connect to the admin database in first place. only if i do so, i can use any other db. however, if i connect via MongoClient::connect(), i'm unable to switch the db afterwards
[09:22:08] <akske> or at least i haven't found a way to do it yet
[12:27:23] <tmw> ok but is this not just 2 times run this command?
[12:28:19] <kali> find() does not show you the result. it's the shell itself trying to do something smart with what the javascript expression evaluates too
[12:28:33] <kali> if you do just a find, the shell sees a cursor, and starts iterating over it
[14:22:49] <platzhirsch> On my VPS I noticed super slow queries when starting my application and MongoDB for the first time. 4min for the first 2-3 queries from the app. After that it's fine. Should I fire some warm up queries ?
[14:25:12] <Nodex> it's just loading your working set into ram
[14:25:54] <platzhirsch> Nodex: Which is good and necessary, so I just live with it?
[14:26:24] <Nodex> I dont see why it's a problem, I mean how often do you restart your database?
[14:26:58] <platzhirsch> It's just 4min seems to incredibly long, on my local machine it takes 1,6s with a restarted MongoDB instance, but then again no shared I/O, SSD, more CPU priority
[15:04:47] <jp-home> can I make a query using more than one attribute of the array elements?
[15:04:52] <jp-home> like on the last example document
[15:05:26] <jp-home> say there are two elements with grade: 80, but one with mean 75 and another with mean 85
[15:05:37] <jp-home> can I update the one with mean 85 only like: db.students.update( { _id: 4, "grades.grade": 80, "grades.mean": 85 }, { $set: { "grades.$.std" : 6 } } )
[15:06:19] <jp-home> seems when I do that it updates one of them randomly
[15:13:43] <Joeskyyy> +1, you'd have to try and script something like that.
[15:33:55] <Ben`> if i have a structure like http://docs.mongodb.org/manual/tutorial/model-tree-structures-with-nested-sets/ what kind of indexes should i make?
[15:34:57] <Nodex> depends how you're going to query it
[15:36:50] <Ben`> i will be querying like in the example, where left is $gt a value, and right is $lt a value
[15:37:46] <Nodex> a compound index on left and right then
[15:39:45] <Nodex> although I don't understand what the top var part means and secondly they're dotted notation but the inserts are not so I can only assume that's an internal mongodb trick I am not aware of
[15:45:30] <meekohi> If every doc in my collection has a position, are there any pros/cons of using GeoJSON vs. simple [long, lat]?
[15:56:57] <tiller> hey, is it worth-it to put an index on a date? The date is used in a query like "where date > XX"
[16:50:45] <Nodex> references are more of a conformaty, they have no real meaning or value
[16:51:17] <Nodex> if your app really needs references then you're either structuring it wrong or Mongodb is not the right fit
[16:54:02] <thiago-br> entendi agora o conceito das referencias. Como estou trabalhando com nodejs + express, eu acreditei que o Mongodb funcionaria para qualquer projeto.
[16:54:09] <thiago-br> Now I understand the concept of references. As I am working with nodejs + express, I believed MongoDB work for any project.
[16:54:24] <cheeser> like any tool, some fits are better than others.
[16:56:40] <thiago-br> You think valid, using MongoDB for an application where each user has access to only your information? Thus each table / collection that would store your user_id.
[17:01:09] <Nodex> thiago-br : I don;t know what that means
[17:14:17] <ekristen> how do people rotate mongodb.log in here?
[17:14:31] <ekristen> the suggested logrotate file seems to make it so that mongodb no longer writes to a log file
[18:55:35] <Kaiju> Hi guys, I just started testing on a new analytics system I built. There is so much data streaming at mongo that it maxed out its one writing core. I think its the index builder that causing the bottle neck on the cpu. I would like to maximize usage on all cores on the server before spinning up more. Is there a best practice for this?
[18:56:13] <Kaiju> or anything else that may be pertinent to high write loads
[19:24:24] <david99world> when I use db.mycollection.getIndexes(), some of the results have a key "ns" with part of this ns being a name in front, so say "products.price", but sometimes it appears to just show "price", what determines if something comes before the word price even if price is in the root of the object? I could understand if the JSON had a nested document, but how is this "ns" created?
[19:26:05] <kali> david99world: weird... ns is usually the "qualified" collection name, that is <database>.<collection>