[05:31:28] <hadees> is there a performance difference between $in with only searching for one thing and just a regular query?
[05:31:59] <mrpro> i'd think so unless its smart enough to change in with one element for regular
[06:06:28] <mmlac> If I have a collection that heavily gets queried using two fields in conjunction, a: "xxx", b: "yyy", what would be a good index for that? just ensureIndex({a: 1, b: 1})?
[06:11:19] <crudson> you can always do .explain() or run server with --notablescan to be strict about indexes
[06:57:33] <daurnimator> how do you get around the fact that bson dictionaries are ordered?
[07:08:03] <daurnimator> http://www.mongodb.org/display/DOCS/Inserting If you're seeing this, it means something is horribly wrong with the MongoDB confluence site.
[07:55:15] <alexluya> Hello,I want to compile hadoop connector,get this error:Hadoop Release '%s' is an invalid/unsupported release. Valid entries are in 1.0.3
[09:19:10] <monu> Hi, i'm a new mongodb user. And for some understanding, i create several db ( admin, check, test for example) and i want to add automatically admin user to all the db. There is a method ??
[09:23:36] <monu> Should i add manually on each db, admin user ?
[09:27:52] <monu> How can i add automatically admin user to new db ?
[12:02:23] <Aartsie> How to secure a mongoDB ? i followed this steps http://www.mongodb.org/display/DOCS/Security+and+Authentication but it don't work
[13:04:33] <Aartsie> kali: yes i start now without authentication
[13:16:59] <barcelona0202> is there a way to get the lastest entries to a mongoDB "streamed" out, so that instead of having to query the db every x seconds to check for new entries, i can be notified as new entries appear? (pymongo, python) thanks
[13:17:17] <barcelona0202> "notified" in a class or function, that is.
[13:24:28] <NodeX> there is no pub/sub in mongo if that's what you're after
[13:28:25] <barcelona0202> NodeX: I suppose some kind of subscriptions, yes. so what would be the most efficient way of handling every entry to the db as they arrive (100/second) ?
[13:43:04] <NodeX> there are some rivers for Elastic search that monitor the oplog
[17:42:54] <peas> how many spatial lookups does mongodb support? https://docs.djangoproject.com/en/dev/ref/contrib/gis/db-api/#compatibility-tables
[17:56:55] <wereHamster> peas: what quantity is '1 spacial lookup' ?
[17:59:39] <peas> wereHamster: 1=1 ;-> : in reference to the compatibility tables, are you saying mongodb geospatial indexing supports only one "Lookup Type"?
[18:35:23] <Goopyo> When is it better to create a collection vs index a category?
[18:36:51] <Goopyo> i.e posts_wall posts_chat posts_comments vs posts with a category field of ['wall' , 'chat', 'comments'] ?
[18:38:16] <kali> Goopyo: choose the layout that will make your most frequent queries faster
[18:38:38] <kali> Goopyo: if you show wall chat and comments interspeded, put them in the same collection
[18:39:02] <Goopyo> ok so if you are querying across things keep them in one?
[18:39:41] <Goopyo> but then that would make you more susceptible to needing sharding down the road right?
[18:40:00] <kali> maybe yes. the point being, when you design for mongodb, you need to thiknk about how you access the data
[18:41:19] <kali> Goopyo: that's right, you will have a bigger collection. but a sharded collection (by user_id and timestamp for instance ?) might be more efficient than hitting three collections on three different servers
[18:42:16] <Goopyo> yeah. You already addressed that, thats exactly what I plan on doing (I will query across categories) so it makes sense to keep it in one collection. However I'm curious as which has more overhead 3 queries on small collection or one on a big one.
[18:44:01] <kali> Goopyo: if the index are in memory, I guess it will be more or less equivalent
[18:44:46] <kali> a good option for this use case is to paginate the items together
[18:45:04] <kali> there was a blog post somewhere...
[18:46:22] <Goopyo> so if they're equivalent the 1 collection use case is probably easier. How about for scaling would they be the same?
[18:47:24] <kali> Goopyo: the important thing is to paginate items, actualy
[18:47:34] <kali> Goopyo: store 10 or 20 of them in the same document
[18:48:23] <Goopyo> google pagination always brings up orm/web framework stuff
[18:48:24] <kali> but this is more important than one or three collection :)
[18:49:10] <kali> basic idea was: one doc per item is easy but inneficient. one doc per user is just as easy and bad
[18:49:33] <kali> the right thing to do require more work, but allow for a much better data locality
[18:49:50] <Goopyo> very true. Now that I think about it collections should be separated only when the data structures of the documents are different. Its more of a organization thing
[18:50:24] <Goopyo> oh and is this all handled software side?
[18:50:52] <Goopyo> I guess you could put them in say 5 minute packets
[18:51:05] <sambomartin> hi, i have a question about an using $and with a couple of indexed attribs. is this a good place to ask?
[18:51:25] <Goopyo> yup just ask. someone will help
[18:51:47] <kali> Goopyo: yeah, it's application side logic. it depends too much on your use case for mongodb to have a generic solution i guess
[18:52:29] <kali> Goopyo: sorry, i can't find that blog post, but I think I gave you the idea :)
[18:52:30] <adkron> I'm having some trouble with ruby mongo 1.7.0 it looks like when a collection doesn't exist and I'm using a replica set I get (errmsg: 'not master'; ok: '0.0')
[18:52:32] <sambomartin> when explained, uses index
[18:52:40] <Goopyo> kali: to be honest I'm suprised it makes much a performance difference, considering if the documents are store efficiently the only true difference should be the extra _id field
[18:55:56] <Goopyo> and which db is your client connecting to?
[18:56:07] <adkron> Goopyo: It only fails when the collection doesn't already exist. If I write from a console it writes just fine. After that I can write fine.
[18:57:27] <Goopyo> oh so you want to make the collection on the fly on the secondary?
[18:57:41] <adkron> Goopyo: Does this help? <Mongo::ReplSetConnection:0x5ab2df4 @seeds=[["tm29-s00010", 27017], ["tm29-s00011", 27017], ["tm29-s00012", 27017]] @connected=true>
[18:58:24] <adkron> The error message doesn't tell me which one it is trying to write to when it fails
[18:58:58] <Goopyo> have you tried the create collection command?
[18:59:09] <sambomartin> does anyone know why the $and operator would be causing mongo not to use index?
[18:59:55] <adkron> Goopyo: No because when I try to write it just works from the rails console. Doesn't work at all from the web app. I can try the create command from the console.
[19:00:36] <adkron> Goopyo: Should it not create the collection when you try to write? I've been working with Mongo for 2 and a half years and have never had an issue like this.
[19:01:03] <adkron> I've been fighting this for two days. Maybe I should have used the support contract we have.
[19:01:21] <Goopyo> sambomartin: if I recall with an $and query all the keys have to be indexed for it to use an index. Do you have a multipart index set?
[19:02:03] <Goopyo> adkron: yeah writing to a new collection should create it.
[19:34:30] <kali> adkron: are you sure the RS is fine ?
[19:36:59] <adkron> kali: It says everything is fine when I get into the mongo console.
[19:39:45] <adkron> kali: It works. No I'm on a private cloud at Engine Yard.
[19:40:30] <kali> ok, i don't know how EY works, but sometimes pepole have problem mixing internal and external hostnames
[19:41:26] <kali> i use mongo driver 1.7.0 and mongoid 2.4.10, but not talking to RS (using mongos on localhost)... i can't seen anything else to check
[19:41:29] <adkron> All of my hostnames look like tm##-s000##. They are also all in my hosts file poiting to ips.
[19:42:19] <adkron> kali: Thanks. Now If I can just get EY to get on the line with me. I also have a mongo support contract, but I think I'm on my own when using mongoid.
[19:42:47] <kali> adkron: it does not look like a mongoid issue
[19:44:13] <adkron> I just downgraded the mongo and mongoid gems. I redeployed and it seems to be working.
[19:46:18] <adkron> kali and Goopyo thanks for trying to help
[19:49:54] <adkron> kali, I downgraded mongoid 2.5.0 -> 2.4.12 and mongo 1.7.0 -> 1.6.2
[19:54:22] <Goopyo> kali: would you happen to know if a single $in has a better or worse performance than a match?
[20:54:08] <timeturner> is it possible based on multiple matches?
[20:54:30] <timeturner> like db.users.find({_id: something || somethingElse || somethingElse2})
[21:13:33] <sambomartin> following on from $and problem, i've nailed it down to sparse indexes
[21:15:30] <sambomartin> col.find({ $and : [{'att':'this'}, {'att','that'}]}) // no i obviously know this doesn't make sense but i wanted to see if the index is used
[21:15:49] <sambomartin> is att is a sparse index, it wont be used for $and
[21:17:34] <timeturner> are mongodb queries reordered for best performance?
[21:55:37] <gigo19801> hi all does anyone use an thirdparty map reduce for mongo db, so that you dont fall in the javascript single thread ?
[23:15:38] <Almindor> how do you specify date to mongodump? I tried mongodump -d dbname -c colname -q '{dtime:{$gt:{$date:1343800800000}}}' which should be 1st aug 2012 (and works as a find inside the db itself) but it gives me 0 results