PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 17th of November, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[06:36:24] <solrize> when i try building mongo on fedora 19 i get a ton of g++ error messages that are mostly from boost unused local typedefs being treated as errors... any advice?
[08:52:00] <sigurding> ljnjk
[08:54:39] <harenson> kgjhg
[09:25:23] <theRoUS> Derick: you online atm?
[09:25:44] <theRoUS> ah well.
[09:27:39] <theRoUS> i'm trying to use mongoid -- but without necessarily using a mongoid.yaml file. that is, i want to be able to set everything up programmatically as though it had been read with #load!, but without actually calling #load! (e.g., using database information i get from my app's command line, not hardcoded in a file).
[09:28:05] <theRoUS> where can i find a tutorial that would cover that? the docco seems a little short on examples..
[09:28:47] <theRoUS> merde. i need to go offline now. but i'll see it if anyone is kind enough to answer.. thanks!
[13:52:02] <bennukem> hi
[13:54:11] <bennukem> I'm not sur witch technique is better
[13:54:29] <bennukem> for practice, I would like make a announce website
[13:55:11] <bennukem> every announce have a region and a city (use zipcode)
[13:55:33] <bennukem> the better way is embedded relationship ?
[13:56:05] <bennukem> of reference ?
[13:57:00] <bennukem> sorry for my english
[13:57:32] <ron> depends on how you want to read and write the data.
[14:00:22] <bennukem> for write I m open, for read, I would like search my announces by the adresse or title
[14:01:34] <bennukem> ron: I'm scarry have the same information many time in a lot of announces
[14:01:58] <bennukem> is normal, citys are not unllimited
[14:02:11] <bennukem> soo I think make a reference
[14:02:34] <bennukem> but ..... in nosql ...... I m sur of nothing
[14:03:33] <bennukem> for the write, city and zipcode are choosed in a list by the final user
[20:56:30] <DocMerlin> Hey guys, how do I make $or searches return sorted and not be insanely slow
[20:57:04] <cheeser> use and index
[20:57:09] <cheeser> s/and/an/
[20:57:12] <DocMerlin> the unsorted search runs in less than a second, but the hinted or sorted one takes like 10 minutes
[20:57:16] <DocMerlin> HOW
[20:57:21] <DocMerlin> hint doesn't seem to work
[20:57:35] <cheeser> well, you need to index on both the query preoprites and the sort value
[20:58:13] <DocMerlin> I have
[20:58:32] <cheeser> run .explain() to make sure
[21:00:09] <DocMerlin> It will take about 20 minutes to run the eplain
[21:00:13] <DocMerlin> I'll get bakc to you
[21:00:16] <DocMerlin> db.tx.find([{'vout.scriptPubKey.addresses':'145ZQd6wdnGgmuEb7Q34ud2XgfphRGVVuZ'},{'a_in':'145ZQd6wdnGgmuEb7Q34ud2XgfphRGVVuZ'}],{"vout.scriptPubKey.addresses":1,time:-1,"_id":0}).limit(100).sort({time:1}).explain()
[21:01:05] <cheeser> there's no $or there
[21:04:20] <DocMerlin> db.tx.find({$or:[{'vout.scriptPubKey.addresses':'145ZQd6wdnGgmuEb7Q34ud2XgfphRGVVuZ'},{'a_in':'145ZQd6wdnGgmuEb7Q34ud2XgfphRGVVuZ'}]}).limit(100).sort({time:1}).explain()
[21:04:58] <cheeser> what do your indexes look like?
[21:06:49] <DocMerlin> vout.scriptPubKey.addresses_1, a_in, and time are indexed.
[21:07:49] <DocMerlin> Also, the query terms have compound indexes with time
[21:08:27] <cheeser> all in the same index? because mongo will only use one.
[21:09:28] <DocMerlin> no, can't because vout.scriptPubKey.addresses and a_in are both arrays
[21:10:21] <solrize> i tried to compile 2.4.8 last night and got a ton of compiler error messages, any advice? they were mostly about boost typedefs being declared and never used
[21:10:33] <cheeser> ah, there's your problem probably
[21:11:18] <cheeser> solrize: can't use a binary download?
[21:11:26] <DocMerlin> so how would I do this search then. I want to see if a key is in either array
[21:11:44] <DocMerlin> in sql this would be really easy
[21:11:55] <solrize> cheeser i prefer to compile stuff myself, and also might want to add some extensions so i'll need to do my own builds
[21:12:02] <cheeser> fair enough
[21:12:48] <solrize> i wonder if it could be a boost compatibility issue? i'm using fedora 19 on the box where i had this problem, but i was able to compile 2.4.6 on ubuntu 12.04 a while ago
[21:13:22] <DocMerlin> I guess I could create an array that is the set of both, but it would take about 4 days to add that to the database
[21:14:00] <cheeser> yeah. looks like only 1 array can be part of index
[21:15:37] <DocMerlin> mongo is SOOOOO slow sometimes
[21:16:03] <cheeser> sure if you're off indexes. all databases would be
[21:16:23] <DocMerlin> but it doesn't handle certain situations smartly.
[21:16:38] <DocMerlin> can't use hints when you have an $or apparently
[21:17:38] <cheeser> it can afaik. but you have two different arrays
[21:18:45] <cheeser> http://docs.mongodb.org/manual/core/index-multikey/#limitations