[01:34:32] <GothAlice> Sorting is a separate thing from projection.
[01:34:38] <Streemo> k, must be something provided by the api
[01:35:05] <GothAlice> http://docs.mongodb.org/manual/reference/method/db.collection.find/ vs. http://docs.mongodb.org/manual/reference/method/cursor.sort/#cursor.sort
[01:35:23] <Streemo> its wierd to me because they pass in an object as the second param, making me think its some projection magic
[01:36:00] <GothAlice> Well, you pass an object as your query to find(), an optional object as the projection on find(), and an object defining sort criteria on the call to .sort()
[01:40:35] <GothAlice> Even I drop out of my high-level abstractions and do raw queries using the standard. Some things are just easier without the indirection.
[01:40:53] <Streemo> yeah, nice to just normalize everything..
[01:47:44] <Streemo> I noticed youre always in here helping people.
[01:49:16] <GothAlice> I feel the purpose of life is to improve the situation of as many people as possible, to do otherwise is unworthy. Helping people is what I do.
[01:54:43] <Streemo> Don't let that go unbounded :P
[01:56:14] <Streemo> Helping people too much without helping yourself, that is.
[01:56:33] <GothAlice> Heh; my questions tend to get crickets.
[02:00:41] <GothAlice> https://github.com/marrow/ < all of these
[02:00:53] <GothAlice> https://github.com/amcgregor/ < and these
[02:01:19] <GothAlice> https://github.com/brave/core and https://github.com/brave/forums < were mine, but I split from the group about 10 months ago.
[02:02:28] <Streemo> so many. you seem pretty into python. any partcular reason?
[02:02:49] <GothAlice> Ease of development. And there's all sorts of really nifty things you can do with it—it tends to produce elegant code.
[02:03:15] <GothAlice> for chunk in iter(partial(fileOrSocket.read, 4096), ''): so_something(chunk) # iterate any file-like object 4KB at a time
[02:03:59] <Streemo> that's easy to do in node too
[02:04:36] <GothAlice> Streemo: As an example, https://gist.github.com/amcgregor/707936 — my HTTP/1.1 server in pure Python that compiles to 171 bytecodes.
[02:04:49] <Streemo> file.on(data, function(chunk){do something with chunk})
[02:04:50] <GothAlice> (marrow.server.http, that link is some benchmark results)
[02:04:58] <GothAlice> Streemo: What size are those chunks?
[02:07:46] <Streemo> im not sure the default, but you can change it
[02:07:57] <GothAlice> From the Zen of Python: Explicit is better than implicit.
[02:09:13] <GothAlice> HTTP/1.1 in 171 opcodes that can handle C10K is pretty badass, though. Rackspace 2GB RAM VM, basic, not high-IO.
[02:09:36] <GothAlice> Had to tune the kernel to hell and back to get it to do C10K on one boxen, though.
[02:10:16] <GothAlice> Notably SOCK_WAIT state sockets after connection close would cause the machine to literally run out of outbound port numbers. ^_^
[02:10:45] <Streemo> i dont think django can do something like that
[02:12:21] <GothAlice> https://gist.github.com/amcgregor/3119134 is a comparison between WebCore (my web framework) and Pyramid. Pyramid is substantailly lighter-weight then Django. :)
[02:18:05] <GothAlice> Not really, no. I've got a work-in-progress rewrite, though.
[06:02:11] <tejas-manohar> i feel like this mongoose schema is organized but is it faster or preferable conventionally for me to remove each of those items out to top-level individual items like profile, credit, auth ?
[06:02:15] <tejas-manohar> i feel like this mongoose schema is organized but is it faster or preferable conventionally for me to remove each of those items out to top-level individual items like profile, credit, auth ?
[09:38:52] <jim87> hello! I'd like to find objects in a collection where a filed is set to false or does not exists... db.mycol.find({myvar: [null, false]}) doesn't work. Any idea? Thanks :)
[09:39:23] <jim87> (db.mycol.find({myvar: null}) works though, but not for false values)
[20:39:46] <LouisT> anyone know if there are any plans for MMS monitoring agent for FreeBSD?
[21:40:52] <lpghatguy> Does setting a built-in Mongoose SchemaType property like "min" work alongside an existing validator, or can only one validator exist?
[22:46:28] <Forest> Hello,i am inserting a huge load of data into MongoDB,but i forgot to create indexes. So i guess i need to run the program,but can you tell me when is the best place to create indexes? When the DB is empty or after the all data has been isnerted? Also can you tell me if inserting 20 million records in 25 mins is good time?
[22:50:37] <dimon222_> depends on how you insert it, and what size of data you insert
[23:09:00] <Forest> i guess he had created default indices,cause i forgot to specify
[23:09:07] <Boomtime> yeah, that ratio is not great - often it's a sign of very small documents
[23:09:24] <Boomtime> your documents average 130 bytes
[23:09:48] <Boomtime> this tiny size means that you quickly reach the same price per document in indexes
[23:10:10] <Forest> is there something i can do about it?
[23:10:37] <Boomtime> does it matter to you? if your performance is fine then who cares right?
[23:11:15] <Forest> 25 minutes is quite long,because i will need more indices than the default ones :)
[23:11:24] <Forest> so tha will prolongue the time,right?
[23:11:41] <Boomtime> the import rate you got was ~12,000 documents per second
[23:12:41] <Boomtime> the kind of data you are storing might cause you to spend a lot on indexes anyway
[23:13:19] <Boomtime> you aren't storing much "data" at all, in fact, all your data is in the relationships (the connections) and those are specifically indexed
[23:13:54] <Forest> okay so i just add the indices foe geoqueries and be happy :)
[23:14:08] <Boomtime> pretty much, it's doing what you asked of it
[23:14:27] <Forest> okay,i was afraid i did something wrong
[23:14:43] <Boomtime> nope, it's just your use case
[23:15:12] <Forest> you know i didn´t filter the data cause i need all of them,its for my bachelor thesis :) i want to create routing for user-defiend criteria,e.g 3 bars along the route :)
[23:16:17] <Boomtime> memory wise, it isn't much data, you will get the best performance if all your indexes fit into ram, with a little extra headroom for document churn
[23:17:19] <Forest> i am confused, in my code when do i need to create those indexes? after i insert all the data or before insertign the first one?