PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Saturday the 25th of May, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[03:40:14] <toiletfreak> hello
[03:40:18] <Derick> hello
[03:40:46] <toiletfreak> is anyone familiar with mongodb-native on raspberry ?
[03:41:07] <Derick> running mongod?
[03:41:12] <toiletfreak> no, um
[03:41:22] <toiletfreak> it connects to a DB elsewhere.
[03:41:26] <toiletfreak> MongoClient is used.
[03:41:30] <Derick> which language are you using?
[03:41:35] <toiletfreak> node js..
[03:41:37] <Derick> ah
[03:41:40] <Derick> haven't tried that
[03:41:47] <toiletfreak> it appears to work fine on a normal PC
[03:41:52] <Derick> but the PHP any python drivers should work on RaspI
[03:41:55] <Derick> RasPi
[03:41:59] <toiletfreak> hmm ok..
[03:42:07] <toiletfreak> yeah
[03:42:11] <toiletfreak> strangely
[03:42:18] <toiletfreak> MongoClient.connect() gives a bus error.
[03:42:30] <Derick> yeah, I guess there are some unaligned ints
[03:42:39] <toiletfreak> what does that mean?
[03:42:56] <toiletfreak> i have tried pulling and doing a gyp-rebuild
[03:43:03] <toiletfreak> does not work.
[03:43:07] <Derick> ARM processors are more finicky about how data structures are aligned compared to intel processors
[03:43:28] <toiletfreak> and i search for this link on changing a flag
[03:43:36] <toiletfreak> but its for the BSON submodule apparently.
[03:44:33] <toiletfreak> https://github.com/mongodb/js-bson/issues/37
[03:45:10] <toiletfreak> is there a similar flag that could be changed though?
[03:45:14] <toiletfreak> for the MongoClient
[03:46:06] <Derick> I think https://github.com/mongodb/js-bson/issues/37#issuecomment-14833574 is your best tip for now
[03:47:37] <toiletfreak> mannn
[03:47:40] <toiletfreak> alright.
[03:47:41] <toiletfreak> thanks!
[04:19:52] <toiletfreak> @Derick yes! That did the trick.
[04:20:18] <toiletfreak> i recompiled with the flag set to 0, node-gyp rebuild the bson module.
[04:20:22] <toiletfreak> error is now gone.
[04:20:40] <Derick> whoop!
[04:20:46] <Derick> why are you freaky about toilets?
[04:23:43] <toiletfreak> lol
[04:23:45] <toiletfreak> no
[04:23:54] <toiletfreak> ping done.
[04:47:31] <SrPx> Hello guys, why are you using mongodb over other nosql dbs? That is, what you like more about i?
[04:48:01] <Derick> I can only give a biased answer :)
[09:07:01] <Hounddog> trying to do a pagination but a little stuck here somehow... i am sorting descending, and getting the first batch with limit 10 after this i saving the last id i get from that call and want to get the next 10 items
[09:07:12] <Hounddog> i can not use skip as data is beeing continuously added
[09:07:33] <Hounddog> so i have to go something like where id is smaller then saved id
[09:09:52] <Hounddog> think i found something
[09:09:56] <Hounddog> lets see
[09:12:37] <Hounddog> $lt was what i was searching
[09:17:42] <kali> yeah.
[09:49:23] <blaizco> Hi there, do you know how i filter documents that have a field lower than other?
[09:50:03] <blaizco> example: {space_limit:100, space_used:30} , this document have space_used < space_limit
[09:50:45] <kali> blaizco: only with a $where which is highly inefficient
[09:50:54] <blaizco> Damn
[09:51:07] <kali> blaizco: in this case it is strongly advised to maintain space_remaining :)
[09:51:33] <blaizco> well, yes, but the problem is this can lead to some inconsistency in the data :P
[09:51:36] <blaizco> humm
[09:51:54] <kali> it shouldn't, update to a single document are atomic
[09:52:13] <blaizco> Yes, i know, but i am talking about another subject but right
[09:53:37] <kali> as a matter of fact, you can also do it with the aggregation framework. it would be slightly more efficient than $where in terms of cpu, but the same in terms of optimisations
[09:54:00] <kali> so i would not recommend it
[09:56:57] <blaizco> HUmm i seee
[10:00:50] <NoOova> Hello all
[10:01:11] <NoOova> how to select documents with field id in (1,2,3)
[10:01:45] <kali> NoOova: http://docs.mongodb.org/manual/reference/operator/in/
[10:01:46] <NoOova> db.document.find({'id': [1,2,3]}) is not work
[10:01:56] <NoOova> YeeeeeeeE!
[10:01:56] <blaizco> use $in :)
[10:01:58] <NoOova> thanx =)
[10:43:33] <aandy> hi, i'm trying to query based on the existance of a field, http://pastie.org/private/gs9kg9wlapo7xhoqukpg#1-2,13,21,28,35,43,50,56,64,71,76,84 but i can't seem to figure out how to make a proper index for it, any ideas as to what i'm doing wrong?
[10:43:57] <aandy> doc snippit at the top. should i rather define the field for all docs and check for null instead?
[10:44:04] <aandy> i'm a bit of a mongodb index novice, so please bare with me ;)
[10:46:31] <aandy> (mongod 2.2.0, so indices on $exists should be ok)
[10:49:35] <aandy> querying with {$ne: null} works, http://pastie.org/private/7btc878svla8mg0uhleg#6,14 but i'm not entirely sure why $exists would scan all objects even if there's no (indexed) value for that doc
[10:53:16] <Nodex> that is strange
[10:53:20] <Nodex> can you hint() the index
[10:54:11] <aandy> Nodex: in find() or?
[10:55:14] <aandy> find({link:{$exists: true}, $hint: {link:1}}) gives the same (scans all objects), if that was what you meant
[10:56:57] <aandy> indexes: http://pastie.org/private/ltkqugd2onlsqgdldeaapg
[11:09:39] <kali> the index will only works if by scanning a slice of it, you get the documents in the right order
[11:10:13] <kali> this is not the case here, as the timestamp order is disrupted by the "links" value
[11:11:23] <kali> you can try just the opposite: { timesstamp:1, links:1}. this will define an index where docs are in the right order, and i think the $exists clause will be evaluated against the index, so it should be fast
[11:11:44] <Nodex> +1
[11:49:06] <aandy> kali: ah, that makes sense. thanks :)
[12:14:59] <Nodex> why do videos take sooooo long to render :(
[12:24:14] <aandy> Nodex: because you don't compromise on quality? :)
[12:31:14] <Nodex> I would like to think so :D
[12:32:06] <Nodex> 5.06ms avg query time across all queries \o/
[16:43:41] <g14nc4rl0> hi :)
[16:43:54] <g14nc4rl0> can you help me, please?
[16:44:55] <g14nc4rl0> I'm searching a FAST no sql db to use with java, preferably with triggers feature
[17:07:38] <oskie> hm, I need a non-blocking version of Storable - does anyone know if there's such a thing?
[17:07:41] <oskie> oops
[17:07:44] <oskie> nevermind