The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help with a query!
Query: SELECT usergroupid FROM user WHERE userid=1
Time before: 0.49647402763367 Time after: 0.49692595005035 EEK! This SELECT usergroupid FROM user WHERE userid=1 query shows up on full page of a thread on showthread about 12 times! I have 42 queries on the page, and I knew something was wrong, just haven't had time to check for a while, just did and it's this thing...maybe looping? How could I solve this? |
#2
|
||||
|
||||
Check the buildpostbit function in admin/functions.php and see if you have any queries in the function.
|
#3
|
||||
|
||||
the function is called getpostbit
and yes, there shouldn't be a query in this function, because it will add an extra query PER POST. if you need the usergroupid because of a hack, you should use a JOIN query in showthread instead.. |
#4
|
||||
|
||||
I was thinking of the comment thats above it I guess thats what it used to be called.
|
#5
|
|||
|
|||
I just looked in the whole postbit part of functions.php and found no query that could be causing this...
Could you maybe give me ideas as to what the query is? How I could locate it? And do all queries have DB_site before them? |
#6
|
||||
|
||||
It would either be in the postbit function in admin/functions.php or in showthread.php (do you get this query lots of times on other pages?)
It would look something like: PHP Code:
|
#7
|
|||
|
|||
It's not on forumhome or forumdisplay for sure, and I don't think it's anywhere else, I mean it appears around 10 times on showthread! It can't be on forumhome as forumhome is only 22 queries, and forumdisplay is only 25 (gotta optimize this actually)...
I'll have to look again for the query. |
#8
|
|||
|
|||
PHP Code:
|
#9
|
||||
|
||||
Thats probably supposed to be there, is the query on all showthread pages? If not is it threads in private forums or forums with specific usergroup permissions?
|
#10
|
||||
|
||||
Yep, thats definatly suposed to be there. Do you have anything like:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|