[00:21:26] <LoOoD> I'm trying to change the priority of the primary member in my mongodb 2.0 replicaset (cfg.members[3].priority = 1) but get this error, "TypeError: cfg.members[3] has no properties (shell):1". Any ideas why?
[02:57:10] <hendry> How do I make mongodb by default listen only for local connections? TCP localhost:28017 & not TCP *:28017 (LISTEN), which is frankly dangerous ?
[03:00:11] <crudson> Did you try --bind_ip 127.0.0.1 ?
[03:00:18] <w3pm> only dangerous depending on your firewall setup
[10:18:52] <Antiarc> I've got something of an index puzzler: https://gist.github.com/ad0f8b015b3d8e80ea44
[10:19:15] <Antiarc> Basically, when explaining a query, it's fast and appears to use an index, but if I drop the explain, then it is slow and appears to do an almost-full-collection scan
[10:19:35] <Antiarc> I'm really scratching my head on this one. Anyone have any ideas?
[10:22:33] <Antiarc> updated with the relevant indexes
[10:23:12] <Antiarc> I had a straight {tags: 1} index as well, and I noticed that the query optimizer would prefer it over the compound index, as well, resulting in a much slower query. Since the tags_1_post_date_-1 index covers the normal tags index, I dropped it.
[10:23:24] <Antiarc> But I feel like there's something fundamentally weird going on here that I am completely missing.
[10:24:19] <Antiarc> I can't for the life of me figure out why an explained query would only scan a few documents and would not scanAndOrder, while the non-explain version performs the scanAndOrder
[10:25:21] <Antiarc> What's even more fun is that if I explicitly .hint({post_date: -1, tags: 1}), it's very fast
[10:25:34] <NodeX> which is why I asked for your indexes
[10:25:42] <NodeX> it might be choking on another index
[10:25:52] <Antiarc> Well, I can dump the full set, sure. Sec.
[10:26:17] <Antiarc> gist updated with the full set.
[10:26:37] <kali> Antiarc: with explain(), the optimizer re-evaluates the plan
[10:26:47] <kali> Antiarc: without it, it can use the cached one
[10:27:08] <Antiarc> kali: But I've dropped and re-added indexes, and run reIndex(), which should cause it to recache the optimal plan according to the doc.
[10:27:24] <Antiarc> Additionally, explicitly hinting ({tags: 1, post_date: -1}) results in a slow query
[10:27:53] <Antiarc> the fact that that's what explain is saying it used is making me wonder if it's picking the wrong index somehow. I mean, I can just manually hint from my app, but that's annoying and seems like it'll cause maintenance issues.
[10:29:03] <kali> i'm not sure there is any way to inspect the query plan cache
[10:29:59] <Antiarc> Well, the fact that explain() is actually selecting the *wrong* index is a big ol' red flag for me, but I'm not sure what I'm doing to get it to settle on that index.
[10:31:32] <Antiarc> well, I can give it a post_date: $gt as a query condition, which gets it to use the right index.
[11:08:35] <solars> hey, is there any tool, admin interface, etc that provides a list of (slow) queries on a collection and whether an index is used or not? (other than the logfiles or explain output, to quickly get an overview of which indices should be created)
[11:09:26] <Zelest> indeed.. always nice to get some free hosting :D
[11:28:18] <joshua> solars: you can adjust the mongo profiler level to log the slower queries. If you can enable MMS though that probably would be handy to see things graphically
[11:42:53] <Antiarc> This index issue has me stumped. I can make it work via hint, but I absolutely cannot get mongo to select the "fast" index on its own.
[11:44:44] <joshua> We went over that in the training but I forget the specifics.
[11:44:57] <joshua> Thats why I gotta take the online class coming up. heh
[11:45:20] <Antiarc> joshua: I thought I knew mongo's indexing stuff forwards and backwards, but this one is just behaving completely counter to everything I know about its indexing behaviors.
[11:45:32] <Antiarc> But. I can solve it tomorrow. Now I need sleep :)
[11:45:45] <NodeX> Antiarc : did you gist your indexes?
[11:45:52] <Antiarc> NodeX: Yes, I added them to the original gist.
[11:51:32] <Antiarc> Bah, I'm gonna have to do a code revert before I can do that
[11:51:37] <Antiarc> Since I'll otherwise get bad hint exceptions.
[11:51:45] <Antiarc> Yeah, I'm just gonna do this tomorrow.
[11:52:05] <Antiarc> But yes, I really did try having only one index or the other and doing a reindex and running that test and it was still slow as hell.
[11:52:27] <Antiarc> Anyhow, I'll pick it up later. Have a good (evening/morning appropriate)
[16:05:24] <lunali> hey dudes, im using the aggregate framework and i am having a match and group in the pipeline, i want the group function to limit the registers it uses to 100, for example
[16:07:36] <NodeX> I am not sure that's possible if I understand you correctly
[16:08:38] <lunali> hmm, in the pipeline im having a match and the result of that match is used for grouping, right?
[16:11:37] <lunali> when a match returns 20 documents, the group function is grouping them, but i dont want 20 documents, i just want the last 10 of the all (20) documents
[17:25:29] <kali> AlphaPinky: that usually refers to the dozen pages of boring forms you have to code in your webapp
[17:25:55] <kali> AlphaPinky: and i tend to disagree with this statement. CRUD is not a database thing, it's a web framework thing
[17:30:43] <xbuzz> looking to see if there is a performance hit for $inc multiple fields in a single update. if i'm updating 3 fields versus 6 fields.
[17:32:54] <kali> xbuzz: i would expect the difference to be quite insignificant compared to the cost of locking, fetching, journaling, plumbing, etc
[17:34:08] <kali> maybe more significant if there are indexes on the fields
[17:36:20] <xbuzz> kali: gotcha. thanks. indexes are def important here. this will be ran about 5 million times a day. so at that rate it's updating 15-30 million fields. i figure a single update is more efficient. just wanted to make sure.
[17:37:03] <xbuzz> kali: or updating fields 15-30 million times. not 15-30 million different fields / docs :D
[17:45:54] <JoeyJoeJo> How can I add a field to an existing document?
[18:50:37] <remonvv> ORM/ODM, it's still an interesting debate which is the more appropriate term ;)
[18:51:36] <remonvv> ODM is accurate, ORM is more recognizable. The joy of development acronyms.
[19:17:19] <rev1> i'm looking for documentation on querying historical server status information, e.g. how can i find out what the network utilization was for our primary on cyber monday?
[19:22:40] <blankstare> hi all. i just recently compiled the mongo driver for xampp and every time I try and add the extension to php.ini, apache serves php as a d/l'able file. any suggestions as to what may have gone wrong here?
[19:27:32] <kchodorow_> blankstare: check your apache error log
[19:27:55] <blankstare> ah it looks like an architecture mixup
[19:28:43] <blankstare> i'm guessing php is x86 and x86_64 was targeted
[19:29:21] <blankstare> how would i compile mongo.so as 32bit?
[19:33:15] <rev1> hey everyone; does anyone know how to query mongo for network utilization? mms is doing it by magic, which is fine, but i need to look at hourly utilization back in november, and mms only lets me look at daily charts back that far.
[20:17:36] <a|3x> my mongod process has a virtual memory size of 12 gb but resident and shared only 2 and 2, how can i tweak the setup to allow more stuff in memory (i have 12 gb of ram)?
[21:53:35] <tworkin> is there a tool for inspecting BSON blobs? I keep getting bad element type, and even trying to enumerate what fields are in the object is throwing the bad element error
[23:48:05] <w3pm> i thought replsets were supposed to be transparent to the application? why are there mongo_replset methods in the drivers?
[23:56:00] <PhanLord_> how could i get count/sum of the array sizes within documents
[23:56:43] <PhanLord_> and number of items within arrays within array of document :)