The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
Quote:
Btw, totally off-topic, is this automerge thingy that has happened for me a couple of times. Is this a new feature in vb3.0.8? I have vb3.0.3 right now. Quote:
|
#12
|
||||
|
||||
Nope. It's a Hack by Xenon
|
#13
|
|||
|
|||
What about the order of the WHERE clause? For example, the first post has NOT IN($excludethreadid) AND forumid NOT IN($excludeforumid) but $excludethreadid is likely bigger than $excludeforumid, so does order matter here?
|
#14
|
||||
|
||||
Quote:
Quote:
I have a limit of 20 in the first query to ensure that the total after the exceptions has been made that i still have atleast 10 left. |
#15
|
||||
|
||||
I am not sure if order does matter. But if mySQL is smart (I expect it is) it should optimize the query itself to perform bolean shortcut tests as fast as possible.
|
#16
|
||||
|
||||
Quote:
Quote:
Maybe (not sure!) better PHP Code:
|
#17
|
|||
|
|||
PHP Code:
I suggest you just put back the threadid in the WHERE clause. Then add indexes on all (on forumid, on threadid & on lastpost) columns used in a WHERE or ORDER BY clause. This could speed up things a lot. For threadid and forumid, you can use unique indexes. |
#18
|
||||
|
||||
Yes, those are all possible Values for sticky and visible.
Depending on the mySQL Version, this is necessary to convince the optimizer to use the Indexes. Take a look at search.php, it does the same. https://vborg.vbsupport.ru/showthread.php?t=66578 |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|