The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Why does this query take so long??
Hopefully someone here can help me with this, because I'm about out of ideas.
I use the following query to pull the last 10 threads on pretty much every page on my site... PHP Code:
PHP Code:
|
#2
|
|||
|
|||
how many forums are included? the more forums ...the longer it takes to look for latest threads.
|
#3
|
||||
|
||||
Tigga, it honestly depends on how many forums you don't want to show. For example, on my board, I only have a few private forums that nobody should see. So, it might be more efficient for me to hard code those in instead of basing them on forumpermissions. Then, my query would say:
WHERE open<>10 $iforumperms and forumid not in (1,3,4) That might help speed things up a bit. However, if you have a ton of forums that are only visible to select users, you might be stuck with the slower query. Typically, I would simply exclude forums that guests shouldn't see and be happy with that and not worry that the latest private threads don't show up in the list. Amy |
#4
|
||||
|
||||
Also, I would personally kill the thread icon part and get rid of that join. But that's just a personal preference.
Amy |
#5
|
||||
|
||||
Thanks Lang and Amy. I was hoping there would be another way to pull the threads without sacrificing the forum permissions, and I think I found one. I edited the permission system just a little and changed it so it will exclude private forums instead of including all forums that aren't private, and it seems to work much better. The query's down to about 0.001 seconds and it seems to be working perfectly.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|