[00:48:06] <datafirm> is the 16MB limit on the aggregation pipeline for each document returned as a max size, or the collection response as a whole?
[00:52:18] <Lobosque> Hey guys, I'm new to mongo. I have three collections: users, items, and quotes. items references users and quotes references items. What is the best way to get all quotes for items of a given user?
[01:02:14] <cheeser> if they're not nested you'll have to do 3 queries
[01:12:03] <rafaelhbarros> is there an .explain() to mapReduce()?
[01:24:12] <rafaelhbarros> cheeser: I figured out. I've been facing a bunch of interesting problems with mongo & pymongo this week
[01:46:27] <rafaelhbarros> cheeser: is there a way to cover a mapreduce entirely with indexes?
[02:00:30] <adizam> Using mongoose & nodejs.. mongoose attempts to call 'collStats' quite a bit.. and looking at my mongo logs, I'm seeing: DateTime [conn#] command denied: { collStats: "collection_name" }
[02:00:48] <adizam> Just wondering if thats normal. Haven't done much performance tuning in mongo
[02:09:16] <cheeser> afaik, mapreduce does a collection scan
[02:26:49] <adizam> I actually figured it out cheeser
[02:27:14] <adizam> It is nodetime.. initiating a new (non admin) connection for every collection I have.. and attempting to run db.collection.stats(), among other things.. does it every X seconds
[02:27:44] <adizam> I'm not sure if map reduce does a collection scan.. and I know I have a few map reduces in my codebase.. so maybe that is another instance.. but I have confirmed this is the case for me at least. Thanks for the feedback tho :)
[03:01:59] <defaultro> hey guys, is it possible to implement somewhat similar to triggers? I want mongodb to react when a field gets updated. What it would need to do is connect to our nodejs server
[04:10:31] <ruphos> I'm running into an issue using the MongoDB perl driver. I'm trying to page through a large number of documents (125M) to move an array field to its own collection. When I set a batch to be much over 100 docs, I get "can't get db response, not connected"
[04:11:08] <ruphos> it looks like an older issue (https://jira.mongodb.org/browse/PERL-196), but I'm using the latest version of the driver so that should be fixed.
[04:11:37] <ruphos> Anyone around to help me muddle through?
[05:51:27] <ctppppp> Hi everyone, was wondering if when upgrading a mongo replica set from 2.0 if I need to upgrade from 2.0 to 2.2 or I can just go 2.0 straight to 2.4 by following the upgrade procedure in the manual?
[06:39:26] <mark____> http://pastebin.com/uBikAYBj help with the output???
[06:59:56] <johnnode> Hello. I did try to apply this case study (http://docs.mongodb.org/ecosystem/use-cases/storing-comments/#hybrid-schema-design) with this test : http://pastebin.com/rUQheti9. But I got inconsistent data for parent & child. The results of parent & child are not consistent. Did I miss some write/update concern in the code? Thanks a lot for your help.
[07:18:58] <johnnode> Hello. I did try to apply this case study (http://docs.mongodb.org/ecosystem/use-cases/storing-comments/#hybrid-schema-design) with this test : http://pastebin.com/rUQheti9. But I got inconsistent data for parent & child. The results of parent & child are not consistent. Did I miss some write/update concern in the code? Thanks a lot for your help.
[08:28:28] <hello_kitty> can mongodb (or a lightweight likeness) be built into an offline desktop app and packaged/configured in an installer?
[09:14:56] <quattr8> I'm getting really weird behaviour from mongodb :/ I have a session tracking collection were i do findOne's only on the _id (=shard key) before getting the session data I get the site data also with findOne, i cache the site data in memcached, this way the tracking findOne takes about 0.04 seconds to fetch, but when I disable memcached on the site data and force it to get the data from mongodb the tracking findOne takes 0.001 seconds and t
[09:17:21] <quattr8> how can querying the tracking collection suddenly be fast when querying another collection before?
[09:38:59] <KamZou> Hi, i've the following command : mongodump -d stats -c $CUR_COLLECTION --query '{"_id.d": '$YDAY_TIMESTAMP'}' -o ... <<< It's working with integers but not with strings, how could i do please ?
[09:39:16] <KamZou> if the YDAY_TIMESTAMP is in string format ?
[12:18:32] <phrearch> is there some example populate function i can use to for instance populate userids with the appropriate user objects from another query? i know about mongoose, but cant use that in my case
[13:16:49] <Kim^J> I need some help with $elemMatch. According to http://docs.mongodb.org/manual/reference/projection/positional/#proj._S_ and http://docs.mongodb.org/manual/reference/method/db.collection.find/#db.collection.find and http://docs.mongodb.org/manual/reference/projection/elemMatch/ I'm using them right. But my result is a bit odd. Instead of selecting the matching array element it selects every ...
[13:16:55] <Kim^J> ... array element, but with no values. :S
[13:50:22] <birdy111> I am facing an issue with mongodb.... during continuous writes to mongodb ... if I drop some older database, the write performance drastically drops....
[13:52:20] <birdy111> We want maximum 365 databases to exists at a time... so as soon as 366th database comes in we want the first one to be dropped....
[13:52:48] <hipsters_> a database a day, what's the use case there?
[13:53:08] <birdy111> we want to retain data for maximum 1 year
[13:54:18] <birdy111> For example today's db is 08-10-13... so the database of 08-10-12 should be removed....
[13:56:49] <Kim^J> birdy111: If you let each database exist on different drives it shouldn't happen.
[13:57:13] <Kim^J> birdy111: I think the performance drops because it now writes twice the amount of data.
[13:57:26] <Kim^J> Or something, depending on how it removes the database.
[13:59:14] <birdy111> we remove database by issuing "db.dropDatabase()" from mongos... after running "use 08-10-12"
[14:01:54] <birdy111> For drop database, mongodb has to just remove the database file and clean config db, which should finish within a second... according to some experts... But in my case it takes 4-5 minutes on each shard
[14:32:18] <defaultro> hey guys, I'm following this guy's howto. I tried inserting a data but nothing happens on my php page. http://jwage.com/post/30490196727/mongodb-tailable-cursors
[14:46:41] <bmcgee> so what we need now is a third person who can help us both :)
[14:48:45] <bmcgee> I think my issue is down to my key. I know that capped collections maintain the insertion order. If I am using a capped collection as a kind of oplog and want to restart the cursor from a known point, am I able to do something like find({ _id: { $gt: "bla" }}).sort({ $natural: 1
[14:49:13] <bmcgee> soz hit enter early find({ _id: { $gt: "bla" }}).sort({ $natural: 1}).addOption(Bytes.QUERYOPTION_TAILABLE)
[15:14:09] <appleboy> is there a way to disable the logging of "build index tmp.mr.records"?
[15:27:35] <bakis> hey guys i'm using mongohq on heroku, is there a way to dump the data without the user credentials? like the heroku username/password etc? or restore the data in a database while skipping that step?
[15:30:59] <appleboy> also, if a map reduce job errors out on insert due to duplicate key, will it stil try to enter everything else?
[15:31:12] <appleboy> or does it just fail the rest of the job at that point?
[15:47:08] <cheeser> you can limit the size of a shard but not a bare mongod afaict
[15:49:43] <remonvv> It's rather like asking how you can prevent a bucket from overflowing if you put too much water into it. The cause is you putting too much water in it, so prevent that from happening.
[15:54:01] <chaotic_good> there is no shield to be raised?
[15:55:56] <remonvv> Right, but you don't want to hit that point really. If you want to do a write but you can't because you ran out of diskspace you need more diskspace or less data. There's no "Oh we'v reached 20Gb, I'm going to reject writes from now on" sort of functionality.
[15:59:31] <remonvv> Whichever, some sort of storage solution optimized for file storage and serving. In my humble opinion GridFS (and databases in general) aren't exactly the sweetspot for that sort of thing.
[16:16:55] <ruphos> I'm running into an issue using the MongoDB perl driver. I'm trying to page through a large number of documents (125M) to move an array field to its own collection. When I set a batch to be much over 100 docs, I get "can't get db response, not connected" or "missed the response we wanted, please try again"
[16:17:06] <ruphos> it looks like an older issue (https://jira.mongodb.org/browse/PERL-196), but I'm using the latest version of the driver so that should be fixed.
[16:17:10] <defaultro> i saw that question the other day :)
[16:17:23] <ruphos> I still can't figure it out. :/
[16:17:35] <ruphos> it should be fixed, but it isn't
[16:33:48] <remonvv> that returns the tailable cursor
[16:34:24] <remonvv> There might also be a way to just have mongodb log oplog entries but I've never used or tried that.
[16:47:16] <drag> I have two documents, A and B. B references A through a field. I want to delete A and, when that happens, I want to delete all B that references A as well. Is there a way for me to do it via aggregation framework?
[17:25:40] <clarkk> can someone please tell me what the difference is between the _id and the obj.parent[0]._id in this database? http://pastebin.com/raw.php?i=qEFpSH9i
[17:26:00] <clarkk> is there any advantage/disadvantage to having one or the other?
[17:29:40] <cheeser> welll, _id is the id of that document. and the other seems to be more of a foreign key.
[17:30:05] <clarkk> cheeser: yes, but I don't understand the difference in the syntax
[17:36:39] <clarkk> I have tried all day to find something that will allow me to load fixtures (json data) from a file, where subdocuments reference the first-class objects. Does anyone know how I can do this, please?
[17:37:08] <clarkk> I've tried two node packages - pow-fixtures and mongoose-fixtures, but neither do it correctly
[17:41:08] <clarkk> actually, I've just tweaked mongoose-fixtures and now it works! Thank god! :)
[17:41:35] <clarkk> thanks for your advice, ruphos and redsand
[18:04:01] <neeky> at the application level, is having default values for all document fields in my schema a good practice?
[19:03:19] <squeakytoy> Hey all. Is this a typicle situation where a relationship database is better? I have a collection of Videos where each Video can have a number of Tags. Here is the killer requirement; I should be able to find Videos by Tags.
[19:04:10] <cheeser> depends on how you want to model tags, but you could just embed the array of tags directly on the video's document. mongodb lets you query against those, too.
[19:11:09] <defaultro> however, on our existing work setup, data is big. When I make a new replica, do I still need to reconfigure our existing mongodb?
[19:12:16] <cheeser> you can add new replicat set members as you go
[19:13:02] <defaultro> without converting my standalone?
[19:14:03] <defaultro> since I'm on the experimtation part, what would you suggest to me if what I'm doing is tailing the oplog to monitor updates/inserts/deletes? Should I convert to replicaset or bring up another mongodb server?
[19:14:28] <cheeser> your standalone needs to be a replSet member first.
[19:14:35] <cheeser> then you can just rs.add() the new members
[19:15:33] <defaultro> in your first sentence, does it mean I should convert my standalone as replicaset?
[19:36:18] <cheeser> ugh, perl. you're on your own there. :D
[19:36:28] <dllama> hi, i'm using mongoid in a rails4, would this be the wrong room to get some info on eager loading?
[19:36:45] <defaultro> oh, I started this mongodb with --replSet rs0. Should I kill and restart it without this parameters?
[19:36:55] <defaultro> What language are you using cheeser ?
[19:40:47] <ruphos> defaultro: use tailable(1) when you run the query and it should work
[19:41:28] <dllama> guys, anyone? eager loading? https://gist.github.com/mvoloz/3f920a722b233e37f3ea — this definitely does not seem the least bit efficient when fetching records through an association
[19:41:43] <ruphos> e.g., my $cursor = $coll->find()->tailable(1);
[19:42:30] <defaultro> ruphos: I do, this is my code from my first one but it's not query oplog.rs, --replSet rs0
[20:05:56] <defaultro> now, I can install http modules in perl so I can write a code that will connect to NodeJS when there is an update in mongodb :D
[20:18:59] <defaultro> i'm having some minor issues with the field lenght. The lastname field is not accepting more than 7 letters. failing update: objects in a capped ns cannot grow
[20:19:17] <defaultro> how do I specify the size of the fields?
[20:24:17] <cheeser> why are you using a capped collection?
[20:44:24] <diegows> is it safe to remove all the files from a DB from the file system? I need a repair, don't have enough space and I don't need one of the DB anymore
[20:58:51] <cheeser> defaultro: the oplog does its thing regardless of what kind of collection you create
[21:03:30] <defaultro> error was: failing update: objects in a capped ns cannot grow
[21:03:47] <defaultro> but when I shortened it, it took it
[21:04:15] <davi1015> Can anyone tell me what moveChunk.commit is doing in the change log, sometimes i am seeing 1 hour pass from that point to the point moveChunk.from shows up ( doing a loop to moveChunk's manually so thats actually the time commit took to run)
[22:36:58] <dllama> hey guys, i'm getting a "too much data for sort() with no index" error. am not really sure how to fix it. i've tried running db:create_indexes but that didn't solve it
[22:57:18] <cheeser> dllama: what's your query look like?
[22:57:31] <dllama> cheeser, i already got it fixed, thanks though!
[22:57:41] <dllama> i didn't have an index in my model, adding that solved a lot of issues