vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Extremely slow SQL query (https://vborg.vbsupport.ru/showthread.php?t=314416)

yukirina 09-20-2014 04:37 AM

Extremely slow SQL query
 
There's one particular query that is stalling my entire MySQL and forcing it to a 100 CPU load, but I have no idea what it is.

To give context, I have recently transferred from Kimsufi dedicated server to Hetzner's. There has been no problem with moving the files and importing the database, but I put up the forum today and there's just one query that keeps getting marked by the server slow log.

Time Id Command Argument
# Time: 140920 7:30:27
# User@Host: himeuta_saya[himeuta_saya] @ localhost []
# Query_time: 17.132885 Lock_time: 0.000068 Rows_sent: 0 Rows_examined: 32544817
use himeuta_kancolle;
SET timestamp=1411191027;
UPDATE activitystream AS a
INNER JOIN attachment AS at ON (a.contentid = at.attachmentid)
SET
a.score = (1 + (at.counter / 1000))
WHERE
a.typeid = 3;
/usr/sbin/mysqld, Version: 5.5.37-cll (MySQL Community Server (GPL)). started with:
Tcp port: 0 Unix socket: /var/lib/mysql/mysql.sock

Help would be much appreciated.

Lynne 09-20-2014 04:13 PM

Try going to AdminCP > Settings > Options > Activity Stream > Content Tracked and disable "Album Photo" and "Group Photo" See if you still get the same slow queries.


All times are GMT. The time now is 11:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00971 seconds
  • Memory Usage 1,705KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete