View Full Version : 92 queries in forum index
hidjra
09-10-2002, 07:27 PM
Hi,
I just found out that my index page has more dan 92 queries, my host is starting to complain :nervous: How can i reduce the amount of queries??
I have a lot of hacks installed :(
hidjra
g-force2k2
09-10-2002, 10:57 PM
what hacks do you have installed on the forumhome? if you look at the thread in help me finish forum TECK posted something worth taking three queries and making it one ;) regards...
g-force2k2
Erwin
09-11-2002, 12:36 AM
93 would kill any server. Keep in mind a stock vB has 17 queries on the index page (I think). Take out the hacks that uses loops eg. ones that does queries on each forum you have.
hidjra
09-11-2002, 12:49 AM
Originally posted by g-force2k2
what hacks do you have installed on the forumhome? if you look at the thread in help me finish forum TECK posted something worth taking three queries and making it one ;) regards...
g-force2k2
i managed to reduce the amount of queries from 92 to 37 by;
Removing;
- https://vborg.vbsupport.ru/showthread.php?s=&threadid=22881&highlight=lasttitlehack
- https://vborg.vbsupport.ru/showthread.php?s=&threadid=34278&highlight=%24newforumthreadvew
And by using;
- https://vborg.vbsupport.ru/showthread.php?s=&threadid=43305
Thanx for the tip. But i still have a long way to go, 37 queries is still a lot!
hidjra
hidjra
09-11-2002, 12:50 AM
Originally posted by Erwin
93 would kill any server. Keep in mind a stock vB has 17 queries on the index page (I think). Take out the hacks that uses loops eg. ones that does queries on each forum you have.
That would be a good a reason for my host to go crazy :cheeky:
hidjra
Erwin
09-11-2002, 01:42 AM
37 queries is a far cry from 93 - that's a lot better. :)
What's the URL to your forums?
Try to get it to below 30 - remove queries and hacks that are unnecessary.
my forums have 14queries on forumhome...
what's the url? and hacks exacly did you installed?
hidjra
09-11-2002, 09:41 AM
Originally posted by Erwin
37 queries is a far cry from 93 - that's a lot better. :)
What's the URL to your forums?
Try to get it to below 30 - remove queries and hacks that are unnecessary.
thanx, still working on it, i have installed a lot of small hack which i can't even remember installing.
This is the url to my forum
http://community.marokko.nl/forums/
http://community.marokko.nl/forums/index.php?=&explain=1
hidjra
first of all, you are using vb224, in other words you expose yourself (security issues).
second, all those queries (example):
"SELECT template FROM template WHERE title='P_themeheader' "
are just template names that you forgot to cache into $templateused. for each title you forgot, you add a query.
third, you have few hacks that you van spare them... ex member of the day, etc. you have a busy board, so think server wise...
if i would be you i would upgrade asap, to 227 and start hacking slowly again the new board, checking aways the queries.
you could also install in your pc vbulletin so you can do your home work there first.
read this tutorial i made:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=39482
let me know if you have any questions...
hidjra
09-11-2002, 10:11 AM
Originally posted by TECK
first of all, you are using vb224, in other words you expose yourself (security issues).
[QUOTE][b]second, all those queries (example):
"SELECT template FROM template WHERE title='P_themeheader' "
are just template names that you forgot to cache into $templateused. for each title you forgot, you add a query.
thanx this works, got it down to 33 queries :)
if i would be you i would upgrade asap, to 227 and start hacking slowly again the new board, checking aways the queries.
you could also install in your pc vbulletin so you can do your home work there first.
read this tutorial i made:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=39482
let me know if you have any questions...
i was already planning to do this, just did'nt have the time, thanx for the advice.
hidjra
Erwin
09-11-2002, 07:33 PM
If I can see your ?explain=1 then I can hack into your board. :) 2.2.6 and up have disabled this function because of security issues. As TECK said, remember to upgrade. And well done - 33 is very reasonable indeed. :)
hidjra
09-12-2002, 12:37 AM
thanx for all the help guys :squareeyed: . Now i seem to have the same problem with my showthread file, there are 59 queries, and for some reason these 2 queries are repeated for about 20 times, there must be a loop somewhere, i just can't figure out where;
- Query: SELECT usergroupid FROM user WHERE userid=4518
- Query: SELECT moderatorid FROM moderator WHERE userid='4518' LIMIT 1
can someone please help me :ermm:
hidjra
g-force2k2
09-12-2002, 01:53 AM
$DB_site->query_first("
SELECT user.usergroupid AS usergroupid, moderator.moderatorid AS moderatorid
FROM user
LEFT JOIN moderator ON moderator.userid = user.userid
WHERE user.userid='$bbuserinfo[userid]'");
I haven't tested this but it should work :) regards...
g-force2k2
hidjra
09-12-2002, 07:32 AM
Originally posted by g-force2k2
$DB_site->query_first("
SELECT user.usergroupid AS usergroupid, moderator.moderatorid AS moderatorid
FROM user
LEFT JOIN moderator ON moderator.userid = user.userid
WHERE user.userid='$bbuserinfo[userid]'");
I haven't tested this but it should work :) regards...
g-force2k2
thnx g-force, but where should i put this? :surprised:
hidjra
g-force2k2
09-12-2002, 05:25 PM
just put it in place of the other two queries where ever they appear together... regards...
g-force2k2
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.