![]() |
Help optimizing a query
I need help with optimizing queries with indexes.
I try my best but whatever combinations I try the query is slow. Here is an example query: Code:
SELECT COUNT(nzb.threadid) as threads Code:
SELECT COUNT(nzb.threadid) as threads Anyway what's the recommended indexes keeping in mind this query ^. Thanks a lot for any help you can give me. :) |
Hm, isn't the thread count stored in the forum cache array?
Why not build a foreach, using $vbulletin->forumcache? |
It's counting threads that meet a certain condition.
This is the same thing forumdisplay does only I've added the 'nzb' table and am limiting to certain iconids (I use them as categories in this script). |
I don't know if this applies to Mysql but when it comes to oracle, the where ... in clause doesn't use the index.
|
Quote:
That could just be my problem then, thanks for that tip I'll try something keeping that in mind when I get a chance... |
All times are GMT. The time now is 02:57 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|