Status
Not open for further replies.
It's not really a bug, but I'll see if I can tweak that query in the future.

The first query isn't related to any DBTech mod, though, I don't think...

Could you please attach the file here as well?
 
Alrighty, here's what I suggest you do:

Download all your forum files, then do a Ctrl+F in all files for the following strings:
Code:
SET timestamp
Code:
WHERE email LIKE
Code:
SELECT userid, username, email
In that last string, check for the following in any result you find:
Code:
WHERE email =

Finally, I suggest indexing the lastpost column in the thread table. The query mentioning lastpost was an InfoPanels query :)

Finding the source of the above queries + future optimisations to the APTL queries should solve all the slow queries :)


Out of curiosity, how did you enable such a pretty and informative slow query log? We're hosting another forum on this server, a fairly large one, and having this level of logging would be most helpful. Thus far I've been unsuccessful in following the instructions posted in Google :p
 
Open phpmyadmin, browse to the table, click the Index button (hover over the buttons to see what they do) :)

Cheers for the links, I'll check em out :D
 
Open phpmyadmin, browse to the table, click the Index button (hover over the buttons to see what they do) :)

Cheers for the links, I'll check em out :D
An index has been added on lastpost ( Query took 6.4731 sec )
down the bottom:
The indexes lastpost and lastpost_3 seem to be equal and one of them could possibly be removed. Is this a problem?

Also just curious, what will this fix :)
 
Last edited:
Oh there was already an index on lastpost? You can remove the _3 one then.

It was supposed to fix the InfoPanels slow query, but if there was already an index then I'm at a loss for that particular one. It's possible that the query was just slow because of other queries locking up (like the others mentioned in the log).

Any luck finding the source of the others?
 
Oh there was already an index on lastpost? You can remove the _3 one then.

It was supposed to fix the InfoPanels slow query, but if there was already an index then I'm at a loss for that particular one. It's possible that the query was just slow because of other queries locking up (like the others mentioned in the log).

Any luck finding the source of the others?
nah not yet, but was wondering if there would be a quicker way? Maybe something I can type into SSH perhaps?
Edit: I am using grep -r -H “SET timestamp” * (I'll report back and see if that works ^^ )

Edit2:
Code:
root@server [/home/***/public_html/forums]# grep -r -H "SET timestamp" *
gallery/uploadphoto.php:                        ppmysql_query("UPDATE {$Globals[                                                                                                                               'pp_db_prefix']}cache SET timestamp=0 WHERE id=1", $link);
gallery/editphoto.php:            ppmysql_query("UPDATE {$Globals['pp_db_prefix'                                                                                                                               ]}cache SET timestamp=0 WHERE id=1", $link);
gallery/adm-photo.php:            ppmysql_query("UPDATE {$Globals['pp_db_prefix']}cache SET timestamp=0 WHERE id=1", $link);
gallery/adm-photo.php:                ppmysql_query("UPDATE {$Globals['pp_db_prefix']}cache SET timestamp=0 WHERE id=1", $link);
gallery/bulkupload.php:        ppmysql_query("UPDATE {$Globals['pp_db_prefix']}cache SET timestamp=0 WHERE id=1", $link);
gallery/bulkupload.php:        ppmysql_query("UPDATE {$Globals['pp_db_prefix']}cache SET timestamp=0 WHERE id=1", $link);
gallery/bulkupload.php:        ppmysql_query("UPDATE {$Globals['pp_db_prefix']}cache SET timestamp=0 WHERE id=1", $link);
gallery/bulkupload.php:            ppmysql_query("UPDATE {$Globals['pp_db_prefix']}cache SET timestamp=0 WHERE id=1", $link);
gallery/bulkupload.php:            ppmysql_query("UPDATE {$Globals['pp_db_prefix']}cache SET timestamp=0 WHERE id=1", $link);
gallery/bulkupload.php:    ppmysql_query("UPDATE {$Globals['pp_db_prefix']}cache SET timestamp=0 WHERE id=1", $link);
gallery/pp-inc.php:            ppmysql_query("UPDATE {$Globals['pp_db_prefix']}cache SET timestamp=$nextupdate,$localupd='$slashcache' WHERE id=1", $link);
gallery/adm-misc.php:        ppmysql_query("UPDATE {$Globals['pp_db_prefix']}cache SET timestamp=0 WHERE id=1", $link);
gallery/index.php:        ppmysql_query("UPDATE {$Globals['pp_db_prefix']}cache SET timestamp=$nextupdate,statscache='$slashcache' WHERE id=1", $link);
root@server [/home/***/public_html/forums]#
Looks like PhotoPost.

grep -r -H “WHERE email LIKE” * Found nothing.

and

Code:
root@server [/home/***/public_html/forums]# grep -r -H "SELECT userid, username, email" *
includes/cron/gameroom_nightly.php:             SELECT userid, username, email, lastvisit
includes/functions_login.php:                   if ($user = $vbulletin->db->query_first("SELECT userid, username, email, languageid FROM " . TABLE_PREFIX . "user WHERE username = '" . $vbulletin->db->escape_string($username) . "' AND usergroupid <> 3"))
includes/class_dm_user.php:                             SELECT userid, username, email
login.php:              SELECT userid, username, email, languageid
admincp/user.php:                SELECT userid, username, email, ipaddress
root@server [/home/***/public_html/forums]#

Code:
root@server [/home/***/public_html/forums]# grep -r -H "WHERE email =" *
includes/class_dm_user.php:                             WHERE email = '" . $this->dbobject->escape_string($email) . "'
login.php:              WHERE email = '" . $db->escape_string($vbulletin->GPC['email']) . "'
register.php:           WHERE email = '" . $db->escape_string($vbulletin->GPC['email']) . "'"
root@server [/home/***/public_html/forums]#
 
Last edited:
Yeah I did notice that in vBulletin 4.1.3 (which also features a vB3 to vB4 skin converter, hint ;)) indexes the email column in the user table now :)
 
Status
Not open for further replies.

Legacy Advanced Post Thanks / Like

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
4,033
Customer rating
5.00 star(s) 1 ratings
Back
Top