[09:47:51] <NodeX> Pure power of indexes... I was (testing) somehting with upserts and the import was taking about 5 minutes for 85k documents .. about 40k documents through the second test I ensuredIndex on the upsert field and it finished in 3 seconds - if that's not testement to the speed of indexes I dont know what is!
[12:27:30] <abrkn_> what's a quick way to add a field to each document in a collection that's the insert time of the document in iso 8601 (extended)? i've kept the original _id but not familiar with their timestamps
[13:39:09] <chandru_in_> Does findAndModify hold the write lock even if there is a page fault?
[13:42:17] <therealkoopa> I'm trying to figure out the best way to store a changeset/versioning system on some objects that are persisted. Is it better to store a changesets: [] on a document, or create a separate history collection ?
[15:22:53] <therealkoopa> I'm using mongoose (node) and defining some schema/models that reference each other. If you have a BlogPost with comments: [Comment], each comment has an objectId. Is this necessary? Can it be done without an objectId in each embedded document
[15:58:38] <solars> hey, are there any tools to get an overview of the slowest queries? not just logging but a nice overview, etc?
[15:58:46] <NodeX> why would you not want an Object id therealkoopa ?
[15:59:43] <carsten_> solars: the standard profiler is not good for you?
[16:00:24] <Lujeni> solars, profiler is great, also you can use "explain" method for specific query.
[16:00:51] <solars> I'm looking for a tool that analyzes the logs of a running app and filters out the slowest one, I'm not yet interested in particular queries
[16:01:37] <carsten_> that's what the profiler is for
[16:02:26] <solars> I know the profiler, but I'm looking for a tool that uses it to create a report based on various data (days, etc)
[16:15:28] <Goopyo> I have to query all rows in a collection (testing 80,000) and it seems to take 7s. Should I unload this stuff to a cache? or is there a way to make it faster by indexing the whole collection
[16:30:01] <carsten_> somem other poor creature may know
[16:30:04] <Goopyo> my issue is that I want to write a ranking algorithm that requires me to run calculations on all the rows in a collection (i.e for all-time rankings). How can I do this fastest?
[16:30:46] <carsten_> then don't ask for in memory collectioins
[16:31:21] <carsten_> as my coworker said: stay out of #mongodb - full of icompetence
[16:32:08] <solars> good that the incompetence just left
[17:01:08] <tystr> basically the deepest embedded doc is in another collection, and when it's updated there, I wanted to update it everywhere it's embedded
[17:01:36] <NodeX> I dont think it's possible with a direct query
[17:01:48] <NodeX> you will have o bring it into your app and modify it then put it back
[17:02:04] <tystr> hmm ok, that's kinda what i was thinking, just wanted to make sure I wasn't missing something
[17:02:21] <NodeX> I stopped embedding after 1 depth for this reason back in 1.4 /1.6 or something
[17:02:43] <tystr> ya, I could do it with $set if it were only 1 deep
[17:03:17] <NodeX> if you knew the position you can number the arrays
[17:25:15] <infinitiguy> Hi all, Are there any tips to improve performance on a mongo DB when doing a lot of deletes while under a high read/write load? We saw our performance (requests per second) tank when starting deletes
[17:25:27] <infinitiguy> we were doing 2000-3000 r/ws and it fell to about 300ish
[17:27:17] <Goopyo> infinitiguy: whats the data structure like? i.e are old ones being deleted or is it random?
[17:27:54] <infinitiguy> I think it was all that matched a particular ID
[17:27:57] <Goopyo> if its random you can always que up deletes so you do the operation less often
[17:28:05] <infinitiguy> and were deleting everything that matched that
[17:28:13] <infinitiguy> so I think that wouldn't be random
[17:28:51] <dstorrs> infinitiguy: do you need to actually delete them, or can you just mark them as obsolete until load decreases?
[17:29:07] <Goopyo> yeah can you que them for delete and just delete later?
[17:29:45] <Goopyo> if its timeseries data you can used tiered collections (i.e drop a collection which is way faster than deleting the documents)
[17:29:47] <infinitiguy> well - I guess that's the tough part. This is an environment where there usually isn't a low load period. I suppose in the middle of the night load will be a little less - but the application is worldwide so it's never truly quiet
[17:32:00] <dstorrs> writes / deletes always go to master
[17:32:02] <ranman> Goopyo: depends on how long it takes, the bigger the sample size the better, at least a 100 times for something that takes 1s
[17:32:43] <Goopyo> it was 80k documents, list(collection.find()) took 8s, dumping that list to a json file and loading it took 2s. Just tested 10 times with the same thing
[17:40:12] <Goopyo> test finished 12.2 seconds per 80k mongodb read (10 times), 1.53s for a json load from file (10 times).
[17:48:30] <zenocon> hi, can i create a compound index that ignores null values?
[17:49:15] <Goopyo> zenocon: look into sparse indexes
[17:49:25] <zenocon> e.g. { a: "foo", b: "bar", c: null }, { a: "foo", b: "bar", c: null } will not generate a dupe error, but if c has the same value on both, then it will
[17:49:44] <zenocon> i was trying to use sparse, but somehow i don't have it right yet...still getting dupe error
[17:49:48] <Goopyo> well you can also do a non unique index
[17:50:57] <Goopyo> infact unique is optional, not default
[17:51:08] <zenocon> well, i have a compound index on three properties. if all three are identical, then i want it to throw a dupe error, but if only 2 of the 3 are identical i want to allow it
[17:54:52] <zenocon> Goopyo: here's what I'm trying to do: http://hastebin.com/peqotocaxu.sm
[17:55:04] <zenocon> using mongoosejs, but principles are the same
[17:55:35] <zenocon> i want to allow dupes that have the same raffle id and number properties that have a winningTicket == null;
[17:55:52] <zenocon> but not allow the same winningTicket number to be assigned to more than one prize document
[17:56:49] <ranman> Goopyo: could it just be an IO buffer for the printing?
[19:29:24] <kuzushi> Is it possible in the log file to observe all the queries being passed to the server? from what I've seen the logs only show that a query is being performed, even with a -v start of the server?
[19:33:07] <matthewvermaak> i am trying to do an atomic update to a field inside an embedded document, and seem to be tripping up, is there examples of that?
[19:33:21] <matthewvermaak> on the mongodb home, i see examples on documents, not embedded documents
[20:31:34] <meonkeys> Would someone mind approving my post to mongodb-user? I think a member's first post is moderated or something like that.
[20:45:36] <infinitiguy> what's the side effect of having a really small chunkSize?
[20:45:48] <infinitiguy> could that possibly affect delete operations?
[20:46:08] <infinitiguy> I was testing with a heavy load (thousands of read/writes) per second with a 1MB chunkSize set.
[20:46:42] <meonkeys> Anyone know what the RSS/atom feed URL is for https://groups.google.com/forum/?fromgroups#!forum/mongodb-announce ?
[21:05:14] <meonkeys> Whomever just approved my post(s): thank you!
[21:45:08] <timkuijsten> i really don't like to specify a password on the commandline (and in my import scripts that are under version control). so how can i let mongoimport read a config file that contains a password on the server?
[21:47:15] <timkuijsten> doesn't look like mongoimport has any support for this (neither the mongo client) https://github.com/mongodb/mongo/blob/master/src/mongo/tools/import.cpp :(
[22:12:32] <ranman> you could use an environment variable