![]() |
Queries, Queries, Queries ..
Quote:
Also, before upgrading I was getting 97% PHP and 3% mysql .. now the sql percent doubled.. Can someone explain why is this? |
haven't looked at the vb229 code yet, perhaps something has been optimized....
Also: there are many methods out to reduce queries, try to search pm-queries total threads/posts and so on. also if you don't want some things, you can reduce queries to, also with large hacked boards ;) |
Thanks Xenon, I enabled debug mode to see queries.. vbproarcade is adding 3 queries to forum home when there isn't even anything vbproarcade related on forum home..
I have to asks Mr. vbproarcade :paranoid: Quote:
|
you can reduce the query ammount by adding vbproarcade_gamelinkbit and vbproarcade_gamelinks to the $templatesused variable ;)
|
sorry am a newbie, can you explain how? :confused:
|
in your index.php you'll find something like that:
Code:
$templatesused='forumhome_birthdaybit,error_nopermission,forumhome_pmloggedin,forumhome_welcometext,forumhome_logoutcode,forumhome_newposts,forumhome_todayposts,forumhome_logincode,forumhome_loggedinuser,forumhome_loggedinusers,forumhome_lastpostby,forumhome_moderator,forumhome_forumbit_level1_nopost,forumhome_forumbit_level1_post,forumhome_forumbit_level2_nopost,forumhome_forumbit_level2_post,forumhome,forumhome_unregmessage'; |
Make sure all templates being eval() are cached in $templatesused in all your php files. :) That helps.
|
Thanks guys, I am down from 21 queries to 18, I am trying to go lower, lol .. how does this look? just trying to make sure nothing is looping :P
is it bad if I keep debug=1 in config.php so I could keep an eye on this page when I feel the need? or is there another easy method? Code:
Query: SELECT template FROM template WHERE title='options' |
Super noob here, what is the debug=1 in config.php? I would like to try that.
:banana: |
debug allows you to troubleshoot problems or when your trying to optimize things like me :)
in admin/config.php add $debug=1; on a new line, then go to your forums and on the page you want to debug add: &showqueries=1 or &explain=1 to the url .. for example, if you want to see the queries being performed in forum home you're url should look like: /forums/index.php?s=&showqueries=1 don't forget to remove it from the config once your done. |
Oh cool! I added the debug info but didn't know about the querystring to add. Just moved from a shared to a dedicated today, want to see my difference?
Shared Server: Page generated in 1.614294052124 seconds with 21 queries, spending 0.69835984706879 doing MySQL queries and 0.91593420505524 doing PHP things. Dedicated Server: Page generated in 0.10820305347443 seconds with 21 queries, spending 0.029100894927979 doing MySQL queries and 0.079102158546448 doing PHP things Woot! Thanks, I didn't want to install the vbMicrostats to get that info. So now I have your question, is it safe to leave that debug in config? |
No. :) It is a security hole that hackers can take advantage of. This is why from vB 2.2.4 upwards it was disabled as standard.
|
also with debug mode you can change the gloabal template set and other inner vb-things, which can be very risky, too if you don't know what you do ;)
|
Geez 18 queries...
I have 48 on my forumhome.. - miSt |
yeah, and I want it lower lol ;)
|
48 on forumhome? Mist, you're killing your server :eek:
|
Forum home usually performs more queries than any other page .. 48 is a tad high, I've seen some boards over 250! it makes me very nervous :paranoid:
they obviously do not know what the heck they are doing and don't know how to manage their forums for that matter. |
Well i do know what im doing..
But my server can cope very well... Im going to check my file tonight for any misplaced template calls that aren't in the $templatesused variable :) - miSt |
if you have questions, just ask ;)
there are some guys out here who likes to optimize queries ;) |
I'm one of them, but TECK is the god of query optimization!
Anyway...I definitely think anything above 35 on forumhome is not good...I, on my "version 2" of my forum, will have 23 queries logged out, and 25 logged in :) The only problems I have are with showthread, as there is much to be put there. |
Mind if i send my index.php your way Xenon?
I had a quick go tonite and only cut down one query strangly... - miSt |
POST IT! We all want to see/help :)
|
Quote:
|
Quote:
|
mist, yes you can send it to me, then i'll look at it and try to find some things ;)
but don't expect too much too fast. i've got a lot of work ;) |
All times are GMT. The time now is 03:51 AM. |
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:
|