PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Wednesday the 26th of December, 2018

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:26:03] <fengshaun> is it possible to upgrade pre-3.4 db to 3.6 while having only installed mongodb 3.6?
[01:26:37] <fengshaun> I can't build 3.4 while I figure out why it's broken
[01:29:14] <fengshaun> I'm talking about this error: "the data files need to be fully upgraded to version 3.4 before attempting an upgrade to 3.6"
[11:01:47] <Lope> In Meteor I'm doing this: I'm doing this: Animals.rawCollection().distinct('breed').then(distinctBreedValues => console.log(distinctBreedValues))
[11:01:59] <Lope> This works, but it shows me the breeds of dogs and cats etc. I want to somehow do a find to say species:'cat'. Any ideas?
[11:02:22] <Lope> I know how to do it in the mongo console.
[11:02:38] <Lope> db.runCommand({distinct:'products', key:'catN', query:{supl:suplName}});
[11:02:44] <Lope> But you can't do that in meteor.
[11:11:15] <Lope> nevermind
[11:17:31] <ice9> how to find all records of specific value? db.collection.find() returns only one record
[11:43:38] <ice9> can mongodb handle a petabyte of data?
[12:36:07] <arussel> I have an equal query on an indexed field that takes more than 15 hours (keysExamined:103619448), should I give a shot at a sharded index ?
[12:37:36] <arussel> s/sharded/hashed/
[12:38:21] <arussel> and will it be used automatically on '=' query ?
[12:51:20] <ice9> arussel, i'm curious to know what's your database size?
[14:10:50] <Lope> ice9, db.collection.find() in the console returns multiple values.
[14:11:14] <Lope> But if you're using a different driver, it likely only returns a cursor, then the way to get the data varies.
[14:16:10] <ice9> Lope, ok it returns some documents and i have to fetch the next ones by 'lt', how can I return all result in one step?
[14:26:14] <Lope> you haven't said what programming language you're using and what driver etc. RTFM
[14:26:22] <Lope> Check the API documentation
[14:51:15] <ice9> Lope, i'm still talking about mongo terminal
[14:51:44] <ice9> "mongo" client
[15:03:39] <arussel> ice9: it is not that big, around 650G
[15:05:05] <ice9> arussel, and it takes more than 15 hours just to find() from it? wow
[15:14:41] <Lope> I don't know about typing lt, but the mongo terminal is not meant for bulk data retrieval. It's for diagnostics/repairs and testing stuff.
[15:15:10] <Lope> Of course if you do a find and the number of results is high, you'll have to type something to see more.
[15:15:29] <Lope> Make sure you're using indexes on your stuff and you've laid out your data sensibly.
[15:15:57] <Lope> Then you should be using an SSD if you want it to run fast, and make sure you give mongo enough RAM.
[15:16:24] <Lope> If you installed mongo long ago and have an old DB version, you should dump and load your db data into a new database.
[15:24:38] <ice9> it's taking 15 hours to search 650G, how long it would take for a terabyte and a petabyte :D
[15:25:08] <ice9> seems it's not a good solution for big data or real-time searching
[16:32:30] <ice9> Lope, how would you calculate enough ram?
[16:35:55] <Lope> you didn't respond to my questions
[16:36:04] <Lope> Any tool used improperly will perform badly
[16:36:29] <Lope> ideally your frequently accessed data should fit in RAM
[16:36:55] <Lope> add RAM for the OS and other programs of course
[16:41:06] <ice9> Lope, i'm using mongodb 4.0.4 and there is index on the collection, if i access 1 Terabyte date, does it mean i should have 1TB ram?
[17:01:14] <Lope> "there is index on the collection" that's not specific.
[17:01:26] <Lope> There has to be an index for the exact type of find query that you're doing.
[17:01:44] <Lope> It's quite detailed. Even if you do a reverse sort, you need a reverse index.
[17:02:23] <Lope> having an index for foo and bar individually is not enough to query find({foo:1,bar:1}) without scans.
[17:02:35] <Lope> you would have to index {foo:1,bar:1}
[17:03:19] <Lope> ice9, it depends how often you access the data, what kind of performance you're looking for etc, and whether your permanent storage is fast enough.
[17:03:39] <Lope> If you're using a magnetic hard drive, you might find enough performance by switching to SSD.
[17:03:45] <Lope> If that's not fast enough, then RAM.
[17:03:57] <Lope> But first you must optimize your data layout, indexes and so on.
[17:04:24] <Lope> There may also be a choice of different DB engines, and options for enabling multi-threading etc which you can look at.
[17:04:49] <Lope> Just google basic mongodb performance tweaks, it will cover all of this stuff.
[17:04:54] <Lope> MongoDB 101
[17:05:07] <Lope> Good luck, I'm going now.
[17:06:54] <powerninja> hello having issues with mongos
[17:07:54] <powerninja> I tried restarting mongos when I got the following errors ""errmsg" : "None of the hosts for replica set configReplSet could be contacted.",
[17:08:47] <powerninja> the 2 mnogo clusters are running, so I figured I start it, but now I can't even connect via mongo