{"id":9,"date":"2007-12-07T18:36:00","date_gmt":"2007-12-07T16:36:00","guid":{"rendered":"http:\/\/vladimir-shapiro.com\/en\/blog\/2007\/12\/07\/performance-killer-in-phpbb\/"},"modified":"2016-08-18T11:33:42","modified_gmt":"2016-08-18T09:33:42","slug":"performance-killer-in-phpbb","status":"publish","type":"post","link":"https:\/\/vladimir-shapiro.com\/en\/blog\/2007\/12\/07\/performance-killer-in-phpbb\/","title":{"rendered":"Performance Killer in phpBB"},"content":{"rendered":"<p>First benefits from performance optimization: I have discovered\u00c2\u00a0 &#8220;the mother of all queries&#8221; in <a href=\"http:\/\/www.phpbb.com\/\">phpBB<\/a>.<\/p>\n<p><!--more--><\/p>\n<p>I am not sure about the newest version but the installation I use in diorama contains a lot of queries like:<\/p>\n<pre>  SELECT m.word_id\r\n\r\n  FROM phpbb_search_wordmatch m, phpbb_search_wordlist w\r\n\r\n  WHERE w.word_text IN ('S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S')\r\n\r\n  AND m.word_id = w.word_id\r\n\r\n  GROUP BY m.word_id\r\n\r\n  HAVING COUNT(m.word_id) &gt; N<\/pre>\n<p>These queries belong to the forum search logic and floods  <a href=\"http:\/\/vladimir-shapiro.com\/en\/blog\/2007\/11\/14\/mysql-query-optimization\/\">MySQL query logs<\/a> up to 90%. The good news is you can get rid of this logic without any significant functional loss <a href=\"http:\/\/forum.wordreference.com\/showthread.php?t=42045\">according to this discussion<\/a>.<\/p>\n<p>To do this just disable   &#8220;remove_common&#8221; function in <em>includes\/functions_search.php<\/em> (e.g. by putting a return-statement in the first line of it).<\/p>\n<p>Already checked this.   Works good. Works faster.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First benefits from performance optimization: I have discovered\u00c2\u00a0 &#8220;the mother of all queries&#8221; in phpBB.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[21],"_links":{"self":[{"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/posts\/9"}],"collection":[{"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/comments?post=9"}],"version-history":[{"count":1,"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/posts\/9\/revisions"}],"predecessor-version":[{"id":121,"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/posts\/9\/revisions\/121"}],"wp:attachment":[{"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/media?parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/categories?post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/tags?post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}