PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Saturday the 6th of December, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:30:44] <harttho> Does TTL play nicely with sharding (The TTL Index is NOT the shard key)
[04:18:11] <ss_> if i have array of usernames for example. and i want to find all those users with those username, how can i do that with one query?
[04:18:49] <ss_> do i use $in or $all ?
[04:23:44] <ss_> nvm i think $in works
[04:52:08] <morenoh149> is it true pushing to a mongodb object repeatedly results in poor performance?
[04:52:19] <morenoh149> how do I profile this?
[04:53:07] <morenoh149> today a coworker was going through gymnastics to recreate an object and then storing it. To avoid supposed poor mongodb write performance
[04:55:44] <cheeser> morenoh149: um. what?
[04:57:52] <morenoh149> situation was something like: we must store a user's progress through levels. so we have user.hashes = {} user.hashes['1'] = new Date() - typeof(user.hashes) = Object
[04:58:21] <morenoh149> what are some performance considerations in this case?
[04:59:11] <morenoh149> he insisted that it was more performant to additionally have a user.levelsCompleted = Object.keys(user.hashes) = ['1
[04:59:19] <morenoh149> = ['1']
[04:59:22] <morenoh149> or so
[05:00:08] <morenoh149> cheeser:
[05:02:11] <morenoh149> any way to inform mongodb of what the document size may eventually be? so as to avoid constant reallocations?
[05:02:16] <cheeser> to have what now? i don't know waht I'm looking at.
[05:02:26] <cheeser> you can use powerOf2 sizing
[05:03:01] <morenoh149> http://docs.mongodb.org/manual/core/storage/#record-allocation-strategies
[05:03:22] <morenoh149> the webapp has ~30 levels. So I should tell mongodb to allocate that many hashes
[05:04:57] <cheeser> why would the number of levels matter?
[05:06:49] <morenoh149> cheeser: http://docs.mongodb.org/manual/core/storage/#exact-fit-allocation
[05:07:40] <cheeser> you're just storing which level the use has completed, yes?
[05:07:54] <morenoh149> yep
[05:08:02] <cheeser> and they're serial, yes?
[05:08:16] <cheeser> sequential?
[05:09:27] <morenoh149> yes. Keep in mind, it's not my app. I think I'd be able to figure it out myself. I'm dealing with my lack of expertise and his potential misinformation
[05:10:32] <cheeser> why not just store the last completed one? if completing level 10 implies completing levels 1 - 9 then 10 is all you really need to store.
[05:11:35] <morenoh149> not sure. He wants to track levels completed and at what dateTime
[05:13:04] <cheeser> ah.
[05:13:31] <cheeser> personally, i'd go with powerOf2 for simplicity's sake
[05:15:45] <linocisco> hi all
[05:16:02] <linocisco> what programming languages is best to be used with MongoDB?
[05:18:27] <cheeser> which ones do you know?
[05:18:39] <cheeser> the most popular are java and c#
[05:19:17] <linocisco> cheeser, I am new to programming. I know alittle about C, Pascal
[05:20:07] <linocisco> cheeser, on some websites, it is said Ruby and Mongodb are well known match
[05:20:13] <cheeser> i'm a java guy so i'd say java.
[05:20:23] <cheeser> ruby would be an ok choice
[05:21:53] <linocisco> cheeser, Java=?
[05:22:06] <cheeser> what are you asking?
[05:22:44] <linocisco> cheeser, are you using Linux or windows for Java?
[05:23:45] <cheeser> OS X
[05:24:12] <linocisco> cheeser, java should be tightly integrate with Oracle DB. same company. Anyway, father of Linux said Java is https://www.youtube.com/watch?v=Aa55RKWZxxI
[05:24:31] <cheeser> what? that makes 0 sense.
[05:25:33] <tjsail33> is there a way to determine which collection an _id is from? say i have three types of posts as different collections, and I am tracking their responses in one collection by parent. can i use that parent to find the correct collection without querying all three?
[05:25:52] <cheeser> tjsail33: no
[05:26:17] <cheeser> tjsail33: http://docs.mongodb.org/manual/reference/database-references/
[05:27:36] <tjsail33> cheeser - alright, thanks. if the operation only happens occasionally, querying the three collections by an indexed value should be fine perf wise right?
[05:28:01] <cheeser> less than ideal but probably okish depending on your data size
[05:28:34] <tjsail33> fairly small, and i can order the queries so 75% of the time, the first query will be the correct one
[05:29:17] <cheeser> sounds like a plan
[05:29:28] <tjsail33> alright, thanks
[09:55:17] <alfredo22> Hi
[09:56:05] <alfredo22> a newbie question: is it better to create millions of collections to store data or millions of documents in one collection
[09:56:56] <alfredo22> the question is in terms of overall system performance and speed of reads and writes
[10:08:51] <alfredo22> anyone to help?
[15:03:00] <aru_> hi
[15:03:42] <aru_> I'm writing here due to having problem with mongodb introduction to Python driver
[15:03:48] <aru_> someone willing to help me?
[17:41:11] <salty-horse> hi. repost from yesterday: If I resize a document (that is, save()ing a document where one of the fields is much smaller), does mongodb use less space to store it? if so, when does it update the collection's stats() ?
[20:27:41] <AbishayRao> Hi there group!
[20:39:28] <mnml> my mongo server went out of disk space and now the data is gone after reboot, (still in the data folder tho) but when I repair it doesn't recover. Anyone knows what I could do ?
[21:37:49] <GothAlice> mnml: To repair you will need as much free space as your data + ~2GB.
[21:38:01] <GothAlice> (Since it'll need to read out the data and re-write it into new files.)
[21:38:29] <GothAlice> Running out of disk space is one of those thing you'll want to set up monitoring for, since running out is… Very Bad™.
[21:46:11] <joannac> mnml: clean reboot?
[21:46:19] <joannac> mnml: journalling on?
[21:46:30] <mnml> joannac: I did a mongodump using the datapath
[21:46:33] <mnml> and restored
[21:50:32] <joannac> mnml: wait, tell me what you did in order.
[22:06:45] <mnml> joannac: mongodump --dbpath=/data/mongodb/db -d base --journal
[22:15:36] <gr8> a Node.js application I am working with throws an error because the "rethrow_if_no_listeners" flag is true. what does that flag tell me?
[22:35:57] <jonasliljestrand> Is it alright to ask mongoose questions here? did'nt find a mongoose channel
[22:45:21] <gr8> jonasliljestrand: try it ... you'll see
[22:46:56] <jonasliljestrand> if you put it like that.. so here we go :) http://pastebin.com/T7iyEa9e
[23:26:11] <davo> hi all. i'm confused if i'm connecting to a remote mongo server correctly, before I call my sysadmin, i'd like to get your opinion first. when I run ssh to the remote server, passing `-L 27017:localhost:27017 -N` I get `ssh: connect to host 23.22.7.86 port 22: Operation timed out`, i have mongod running in another terminal. any ideas if i am doing something wrong?
[23:36:04] <joannac> yes, looks like you can't ssh to that server?
[23:39:39] <jonasliljestrand> davo
[23:39:54] <jonasliljestrand> if u have mongod running you proberbly cant reassign that port
[23:40:08] <jonasliljestrand> with your ssh tunnel
[23:42:35] <jonasliljestrand> Say you have a mongod running on your local machine on port 27017. Then on your remote connection you can do 27018:localhost:27017 (for example).