![]() |
Remove 1 Database Query Per Page
Intro: The idea is, lets remove 1 query from each page load, if the person is just refreshing the page. At first this may sound not important or just plain stupid, but on "larger" forums, cutting 1 query is always welcomed I know. Description: Basically all this does, is check the current Session Location from the DB against the current WOL path; the Session is already provided by vbulletin, so no extra query there. All we do, is simply check the Location from the Database against the current WOL, if they don't match then the query is allowed to update the database; if they are the same - it is simply ignored. Affects: The only things this will do, is prevent the updating of the "lastactivity", and "location" if a person keeps refreshing the page, IMO that's not really a big deal, vbulletin takes care of deleting and remaking new sessions when they expire anyway. As long as your members are browsing around and such, their lastactivity, location will be updated as per usual. Updates: Version 1.1 - Scripts whosonline, misc are allowed to always update. Version 1.0 - Release Instructions: 1. [ open includes/sessions.php ] 2. [ go to about line 354, or look for $bypass = intval(SESSION_BYPASS); ] 3. [ replace this block of code ] PHP Code:
PHP Code:
|
i'll probably install but i'm happy with my vote for MAF thank you :p
|
Quote:
|
anything that improves overall performance is a PLUS ...
|
Quote:
|
i would like to see a single forum where we can post that kind of Performance hack, because there is some (*i can count at least 25 of these), and they would be more than interesting to add to the next update...
because they are not hacks, they are debugs (when we don't modify a function, it's a debug isn't it?) |
Quote:
|
I like this, but it seems to increase my board's query by 1, rather than knocking one off. Originally had 10, went to 11 after I preformed the mod..
|
Quote:
All this is doing is an IF condition to check the current page, if its the same page then the query is ignored. Also should note: These are "Shutdown queries" which are performed after the output of data to the forum, and that would include whatever hack you are using to count queries. These queries are not "counted" by traditional means, they are executed at the end of the life of the script. |
Hummm how are you guys checking your queries? via putty or something?
|
All times are GMT. The time now is 06:57 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:
|