The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Anyone know where they query is called from in vb3.6.x
I was looking at my slow query log and found several queries similiar to this one:
I had to cut out the postids because the query was over 350,000 characters and too large to post here. Code:
# Query_time: 16 Lock_time: 0 Rows_sent: 43736 Rows_examined: 87970 SELECT thread.threadid, thread.forumid, post.userid FROM thread AS thread INNER JOIN post AS post ON(thread.threadid = post.threadid ) WHERE post.postid IN (MANY POST IDS) AND post.visible = 1; |
#2
|
||||
|
||||
Quote:
The query in question lives in a plugin, not any of the vb code (I did a search on the vb code base, which is to say I might be wrong). The query is slow because it contains over 350 000 characters. The issue is why so many postids, not is there a problem with the query. |
#3
|
||||
|
||||
I don't have any plug-ins, I am just trying to locate where in the VB code this query is. It is a very large forum, any only occasionally this query is slow.
They query may be formatted different in the php file so I can't search for the entire thing such as "SELECT thread.threadid, thread.forumid, post.userid" |
#4
|
||||
|
||||
Looks like one of the search queries.
Actual query is as line 1503 in search.php within vBulletin 3.6.8, the building of the query is before that. PHP Code:
|
#5
|
||||
|
||||
Thanks Wayne,
I have the limit # of results set to 500 in the Admincp. I just counted the # of postid's in that IN clause and there was 44,486 postids. I am not sure dropping that 500 down would have much affect. |
#6
|
||||
|
||||
Track your slow query log and look at your recent searches that happen about the same time. Check the words that are being searched for and if they are overly common, remove them from the search index. For instance on a vBulletin related website, you shouldn't allow searches for vBulletin as it will occur in too many places to be useful. If your site is about flowers than flower can be eliminated. It may mean that your users have to get more creative but that shouldn't cause too much harm. They should get more relevant results.
You can see what people searched for in the query column of your search table. This is cleared every hour so you might want to adjust the query for this in includes/cron/cleanup.php. It is this code: PHP Code:
|
#7
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|