PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 15th of November, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:19:54] <dgaff> Hey all, I have a question about how to speed up grabbing values from a collection
[01:20:03] <StephenLynx> indexes
[01:20:09] <dgaff> lawl
[01:20:27] <dgaff> I have an index on it, but it's just still too slow
[01:20:41] <dgaff> I've tried aggregation as well but no luck
[01:21:51] <cheeser> run explain. make sure you're using the index.
[01:22:59] <Derick> cheeser: hi! I made it back home.
[01:23:22] <dgaff> It does use the index
[01:23:38] <dgaff> the other problem, of course, is walking through 2b documents with an offset will never work
[01:25:18] <cheeser> Derick: great news! it was great seeing everyone last week. exhausting though. how'd ross do on the flight? :D
[01:27:11] <Derick> cheeser: plane was empty, so I booted him to a row of his own
[01:27:25] <Derick> although, the whole Paris thing put a bit of damper on it
[01:27:32] <Derick> ... and of course the 1¾ hours delay :-/
[01:28:54] <Derick> cheeser: I have an engagement in paris in two weeks' time too
[01:29:18] <cheeser> yikes
[01:29:28] <cheeser> probably not at this point...
[01:30:17] <Derick> No, I will go. Otherwise They win.
[01:31:01] <cheeser> well, i was thinking if the even would still be held. but certianly if it's personal travel, go for it.
[01:31:16] <Derick> It's a conference. Certainly it will be held.
[06:06:30] <devdvd> hi all, I'm trying to add a read only user to a database in mongodb 2.4.5
[06:07:29] <devdvd> I've tried db.createUser('user','pass',true), i've tried db.createUser('user', 'pass', roles: [ "read" ] })
[06:07:32] <devdvd> the user creates just fine
[06:07:33] <devdvd> but
[06:07:43] <devdvd> it doesn't seem to be able to read to the database
[06:07:47] <devdvd> read from sorry
[09:09:13] <dddh> is it possible to tune wiredtiger cache settings per db/collection?
[09:10:56] <dddh> for example I have 600gb of logs I don't really need to cache at all and 10gb of data I work with
[09:12:46] <dddh> should I use separate instances or there is some hint not to cache data from logs db/schema/collection ?
[09:57:04] <trax> Hi, with the last C++ driver, trying to create a bson like {"foo":[{"bar":1},{"bar":2}]} where 1 and 2 comes from a vector and getting problem with consts I think
[09:57:17] <trax> example here: http://stackoverflow.com/questions/33710548/mongodb-c-driver-3-0-not-const-arrays
[11:05:28] <thespitzi> Hello
[11:05:55] <thespitzi> In mongodb, is there an easy, built-in way to guess the common type of a field?
[11:06:29] <kali> mmm you mean, as in... discovering the implicit schema ?
[11:06:52] <thespitzi> kali - basically ,yes
[11:07:01] <kali> thespitzi: maybe this can help: https://github.com/variety/variety
[11:07:05] <thespitzi> kali: or at least make a good guess about it, assuming that there is a schema.
[11:07:36] <thespitzi> kali: Thanks! Looks very good.
[11:12:38] <thespitzi> kali: Hmmm, Variety seems to identify all strings as having type String, whereas I'd like it to identify strings which look lake dates as type date.
[11:13:21] <thespitzi> kali: my data originates from a CSV.
[11:21:57] <thespitzi> Perhaps I took a wrong approach, should've used Node JS to parse the CSV first.
[11:22:27] <StephenLynx> yeah
[11:22:29] <StephenLynx> I would do that.
[11:26:18] <kali> StephenLynx: yeah, i would recommend working the csv
[11:26:32] <thespitzi> Ok, thanks.
[11:27:18] <thespitzi> Bye for now.
[13:19:41] <repxxl> hello, i wonder how i can get 2 collections data and sort them by _id for example
[13:21:08] <StephenLynx> in the same query?
[13:40:22] <repxxl> StephenLynx y
[13:41:20] <Rafibd01717> what is the default installation path of mongodb in ubuntu?
[13:41:50] <Rafibd01717> in windows it is program files>mongodb>server>3.0>bin
[13:42:17] <Rafibd01717> in ubuntu?
[13:43:31] <dddh> maybe /usr/bin/mongo ?
[13:45:26] <Rafibd01717> not there dddh:
[13:47:06] <jamiel> Depends on your distribution, type "whereis mongod"
[13:47:24] <jamiel> on Ubuntu it's usually /usr/bin/mongod
[13:48:17] <Rafibd01717> jamiel /usr/ is empty
[13:48:38] <Rafibd01717> is there any way to see where is the files located?
[13:49:16] <dddh> how did you install it?
[13:49:25] <jamiel> Yes, use whereis command to find files in your $PATH , or the find command to search your system
[13:49:29] <Rafibd01717> from ubuntus repo
[13:50:07] <Rafibd01717> jamiel I would be pleased if you tell me the full syntax
[13:50:19] <Rafibd01717> I am not familiar with linux accent
[13:50:25] <jamiel> whereis mongod
[13:50:40] <Rafibd01717> ok
[13:50:42] <jamiel> find / -name mongod
[13:50:46] <jamiel> 2nd one will take a while
[13:51:24] <dddh> there is dpkg --contents mongodb-org
[13:51:45] <Rafibd01717> it says /usr/bin/mongod
[13:52:00] <jamiel> then it's unlikely your /usr is empty
[13:53:08] <Rafibd01717> yes
[13:53:18] <Rafibd01717> but mongod is not there!!!!
[13:53:39] <Rafibd01717> I did manual lookup and ctrl+f search both...!!!
[13:54:25] <Rafibd01717> actually usr/bin is empty
[13:54:32] <Rafibd01717> ./bin is not empty
[13:54:38] <jamiel> ls -l /usr/bin/mongod
[13:54:39] <Rafibd01717> kinda wired situation!!
[13:55:08] <jamiel> Or your GUI is lying to you, use command line
[13:55:16] <Rafibd01717> mongod: /usr/bin/mongod /etc/mongod.conf /etc/mongod.conf~ /usr/bin/X11/mongod /usr/share/man/man1/mongod.1.gz
[13:55:33] <Rafibd01717> this is something I got after using the whereis command in terminal
[13:56:22] <Rafibd01717> jamiel I got it
[14:02:18] <Rafibd01717> jamiel: to start mongod I am using sudo /usr/bin/mongod start command
[14:02:24] <Rafibd01717> but it is not starting
[14:10:55] <Rafibd01717> what is a database instance?
[14:29:45] <Rafibd01717> ping
[17:28:23] <php> Does MongoDB support searching of a database? I'm brand new to it, currently looking at docs but wondering if I even know what I'm looking at.
[17:28:23] <php> Can I search for all records with "something": "something!"
[17:28:41] <php> Is that what .find() does?
[17:30:33] <StephenLynx> yes
[17:32:36] <php> StephenLynx: thank you very much. :) Fast response.
[17:47:32] <php> If I create a collection with: db.createCollection("Transactions", {autoIndexID:true}) — does this sort of work like auto_increment, where _id is filled with something unique?
[17:51:27] <php> StephenLynx: pardon my ping here, but I'm just hoping you're here still :)
[17:52:10] <StephenLynx> that is always true.
[17:52:18] <StephenLynx> you don`t have to use autoIndexID
[17:52:20] <php> oh
[17:52:22] <php> It's default?
[17:52:24] <StephenLynx> yes
[17:52:29] <php> Thanks a lot, StephenLynx. :)
[17:52:35] <StephenLynx> a document can not exist without and id
[17:58:20] <php> StephenLynx: is this doing what I think it's doing? String txnId = document.getObjectId("_id").toString();
[17:58:20] <php> What I think it's doing: getting the _id from the document, and making it a string.
[18:03:56] <StephenLynx> what language is that?
[18:04:20] <php> StephenLynx: Java
[18:04:29] <StephenLynx> I am not familiar with the java driver.
[18:04:32] <php> ah
[18:09:25] <rom1504> php: did you try it ? does it work ?
[18:09:46] <php> Not able to test yet
[18:10:12] <rom1504> http://api.mongodb.org/java/current/org/bson/Document.html#getObjectId-java.lang.Object- http://api.mongodb.org/java/current/org/bson/types/ObjectId.html#toString--
[18:10:30] <rom1504> well really you should code that kind of stuff when you can test, you'll gain time
[18:12:01] <php> I'm on break
[18:12:02] <php> :P
[18:13:14] <php> #toString() appears to return http://api.mongodb.org/java/current/org/bson/types/ObjectId.html#toHexString--
[18:13:20] <php> Decompiled it
[18:13:22] <php> I think I'm fine
[18:13:22] <php> :)
[18:13:28] <php> Thanks rom1504
[18:16:09] <cheeser> why would you decompile the java driver?
[18:17:37] <php> cheeser: to quickly see how everything works
[18:17:50] <php> Command+Click -> Instant view of the source to see it all pieced together
[18:18:06] <cheeser> well, the source is availble...
[18:18:09] <php> Yes
[18:18:20] <php> But having the ability to just command click on the bits I need is way more efficient
[18:35:50] <php> Is it possible to run Mongo client on the current thread only?
[18:36:14] <php> Java
[18:37:36] <php> Actually, never mind.
[18:38:29] <rom1504> php: you can probably configure your ide to get the source
[18:38:36] <rom1504> so it doesn't have to decompile anything
[18:38:50] <php> It decompiles whatever class I want
[18:38:56] <php> I just command click, and I have immediate access to the source of the class I clicked
[18:39:12] <cheeser> it's not *quite* the same but usually enough
[18:45:35] <FreeSpencer> Is there an efficient way to use a datetime as an index?
[18:46:05] <cheeser> what "inefficient" way isn't working for you?
[18:46:36] <FreeSpencer> Well Im prob wrong but isnt every unique index stored in RAM? So there are tons and tons and tons of unique times
[18:47:02] <cheeser> mongo tries to keep them in memory, yes.
[18:47:26] <StephenLynx> FreeSpencer what differentiates datetimes from anything else in that regard?
[18:48:02] <FreeSpencer> Just that most other fields only have a few values not millions like the datetime
[18:49:18] <StephenLynx> wot
[18:49:25] <StephenLynx> v:
[18:49:31] <StephenLynx> a datetime is just an int.
[18:49:54] <StephenLynx> a couple of them at most
[18:50:25] <cheeser> int64 would be my guess.
[18:50:47] <FreeSpencer> Hmmmm
[18:52:17] <rom1504> "Just that most other fields only have a few values not millions like the datetime" most fields actually have millions of value
[18:52:22] <rom1504> for examples strings
[18:52:42] <jamiel> And _id
[18:53:18] <cheeser> yeah. _ids are mostly datetime and they index just fine.
[18:55:10] <FreeSpencer> I guess your right, I was just making sure I wasn't being dumb and using tons of more RAM then needed
[19:25:08] <php> Can I make it so that the Java client isn't telling me via SEVERE, everything that it is doing?
[19:25:43] <rom1504> what's severe ?
[19:27:25] <php> This crap in my terminal:
[19:27:25] <php> 19:03:14 [SEVERE] Nov 15, 2015 7:03:14 PM com.mongodb.diagnostics.logging.JULLogger log