/srv/irclogs.ubuntu.com/2011/02/07/#ubuntu-eu.txt

apollo13zed, ys76 around?10:13
ys76apollo13: Sleeping...10:17
apollo13ys76: grr, SELECT `wiki_page`.`name`, `wiki_revision`.`deleted`, `wiki_revision`.`attachment_id` FROM `wiki_page` LEFT OUTER JOIN `wiki_revision` ON (`wiki_page`.`last_rev_id` = `wiki_revision`.`id`);10:17
apollo13why would this query lock the db for ages10:17
apollo13those are just 19k rows :þ10:18
ys76Phew, I am all but an MySQL expert....10:19
ys76Check for indexes first....10:20
ys76Joins without indexes may cause those "slowdowns"...10:20
zedhi10:21
apollo13http://paste.pocoo.org/show/333606/10:21
apollo13zed: hi10:21
apollo13since yesterday this query never runs…10:21
zedon which server ?10:22
apollo13tilo itself10:22
zederrr i don't see any query running like this one10:22
apollo13zed: gimme a sec10:23
apollo13zed: now10:23
zednothing..10:23
apollo13zed: mind executing it yourself in ubuntu_de_inyoka db?10:24
zedyep10:24
zedmmh10:25
zedthis query might parse 4339295469 rows....10:25
apollo13there aren't that much rows :þ10:26
apollo13mysql> select count(*) from wiki_page;10:26
apollo13+----------+10:26
apollo13| count(*) |10:26
apollo13mysql> select count(*) from wiki_revision;10:26
apollo13+----------+10:26
apollo13| count(*) |10:26
zedyes but a join will have to parse ab rows10:26
zeda*b10:26
apollo13yikes10:27
zed(without indexes of course)10:27
apollo13how to fix that :þ10:27
zedthat's pretty bad10:27
apollo13well the explain indicates an index on wiki_revision, doesn't it?10:27
zedtry adding an index on wiki_page.last_rev_id10:27
zedor I can do it if you want10:28
apollo13I can do that, thx10:28
apollo13| wiki_page |          1 | wiki_page_1ec47986 |            1 | last_rev_id | A10:28
apollo13there is one10:28
apollo13odd thing is: db is doing nothing at all10:29
zedweird10:30
apollo13mysql> SELECT `wiki_page`.`name`, `wiki_revision`.`deleted`, `wiki_revision`.`attachment_id` FROM `wiki_page` LEFT OUTER JOIN `wiki_revision` ON (`wiki_page`.`last_rev_id` = `wiki_revision`.`id`) into outfile '/tmp/test.csv';10:30
apollo13Query OK, 19094 rows affected (0.18 sec)10:30
apollo13zed: looool10:31
apollo13the query works fine if I add a limit 50k10:31
apollo13ah no, got i hanging10:32
apollo1315k still worked10:32
apollo13but I get output then at least10:32
apollo13now it finished10:33
apollo13it's hanging in the read there10:36
apollo13zed: any ways to reorganize those two tables?10:36
zedyep...10:38
zedtry again ?10:39
apollo13wtf10:40
apollo13what did you do?10:40
apollo13(let me recheck if it really works again)10:42
apollo13zed: what did you do :)10:44
zedoptimize both tqbles10:46
zedtables10:46
apollo13k, is there a shortcut to run it over the whole db?10:46
apollo13+ how long would it take10:46
apollo13zed: does it hurt if I run that over all tables?10:47
apollo13zed: and where the hell is the cherokee testpage coming @ubuntuusers.de10:48
apollo13we had a nice error page there *gg*10:49
apollo13take to me zed :þ10:50
apollo13talk*10:51
ys76apollo13: It would affect performance during the run...10:54
ys76and no, I don't know a shortcut10:54
apollo13ys76: I took ubuntuusers.de down completly10:54
ys76Just saw it.10:54
apollo13na ubuntuusers is down since a while…10:54
apollo13I have no idea where cherokee is coming from10:54
apollo13apperently a server outside of my control10:54
ys76where did you get that page?10:55
apollo13oh I am so stupid10:55
ys76*smile*10:55
apollo13localhost10:55
apollo13ys76: how long do you think an optimize over all tables will take?10:55
ys76Phew now idea...10:57
ys76Depends on the size...10:57
apollo137 gig10:57
apollo13+- 1 or 210:57
ys76MIght  take a while...10:58
apollo13define while, hours days…10:58
apollo13years :þ10:58
ys76It took half an hour on our 6GB OTRS DB10:59
apollo13great, I'll throw it over all then10:59
apollo13zed: thanks for your help10:59
ys76Just start with a tiny little table....11:00
EnTeQuAkmy last OPTIMIZE took about an hour locally (with my old laptop)11:03
apollo13running it over all now, we have till this evenining ;)11:03
EnTeQuAk:)11:03
EnTeQuAkhey, it's the first downtime since months11:03
EnTeQuAkits totally overdue11:04
apollo13EnTeQuAk: btw I read the postgres performance ml a while ago, people actually disable auto vacuum and run it manually11:05
apollo13just so it doesn't kick in during day and kills the io performance :)11:05
apollo13+  other crazy stuff *gg*11:05
EnTeQuAkmakes sense11:10
zedappsorry i was eating11:43
apollo1337 rows in set (1 hour 46 min 24.81 sec)12:55
apollo13 yeha12:55
zedwow :)13:53
apollo13optimize over the whole db13:54

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!