Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-10-2003, 01:35 AM
Gutspiller's Avatar
Gutspiller Gutspiller is offline
 
Join Date: Dec 2001
Posts: 1,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to lower 104 queries on frontpage?

<a href="http://www.theforumz.com/forumz/" target="_blank">http://www.theforumz.com/forumz/</a>

Can peeps take a look at that and tell me what couple of things I might be able to take out that may affect my load query? I think 104 is kinda high. especially when I hear people talk about 17 and 24.

I know some of the stuff I have going on at the bottom is perhaps part of my problem. Anybody know off hand how many queries the "Current World Time" hack adds?

Anything to help would be appreciated.

Thanks. :dead:
Reply With Quote
  #2  
Old 07-10-2003, 02:05 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm is it just me or i see a page stating 33 queries which seems alrite.

Quote:
? Copyright 2001 - 2003 CuttingTheEdge.com
vBulletin. Copyright ?2000 - 2003, Jelsoft Enterprises Limited.
Page generated in 0.7567490 seconds (-159.10% PHP - 259.10% MySQL) with 33 queries.
Reply With Quote
  #3  
Old 07-10-2003, 03:26 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

33 is still high.

Make sure you avoid:

Using querys in while loop's

Not adding your custom displayed templates to the $templatesused car

Install both the forumhome optimize hacks.

Remove the forum mod query in index.php, sence youve removed the moderator colum anyway :alien:
Reply With Quote
  #4  
Old 07-10-2003, 06:57 AM
Gutspiller's Avatar
Gutspiller Gutspiller is offline
 
Join Date: Dec 2001
Posts: 1,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 10:26 PM Anime-loo said this in Post #3
Remove the forum mod query in index.php, sence youve removed the moderator colum anyway :alien:

Where would I find that and what exact parts would I remove, do you know? certain code I should look for?
Reply With Quote
  #5  
Old 07-10-2003, 02:26 PM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well as a guest on your forums, you'll only see around 30 queries. As a registered member though, it's closer to 100. One thing you can do is add the following templates to the template cache at the beginning of the file -authority_list, forumhome_quicksearch, forumhome_dropdownbit, forumhome_quote, forumhome_newforumthreads.

You also have a query that appears to be counting the number of threads since a certain time for every forum, which is adding about 50 queries to your page -
SELECT COUNT(threadid) AS total FROM thread WHERE dateline>1057849698 and forumid=XX

Add those templates to the template cache, find that query above & remove it, and the number of queries should be a fraction of what they are now.
Reply With Quote
  #6  
Old 07-10-2003, 10:36 PM
SmEdD's Avatar
SmEdD SmEdD is offline
 
Join Date: Mar 2003
Location: Ontario, Canada
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 03:57 AM Gutspiller said this in Post #4
Where would I find that and what exact parts would I remove, do you know? certain code I should look for?

There a hack out there to put moderators into cache. Look at the code you edit and just remove the code completely. It's called forum home optmization I belive.
Reply With Quote
  #7  
Old 07-12-2003, 12:15 AM
Gutspiller's Avatar
Gutspiller Gutspiller is offline
 
Join Date: Dec 2001
Posts: 1,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 09:26 AM Tigga said this in Post #5
Well as a guest on your forums, you'll only see around 30 queries. As a registered member though, it's closer to 100. One thing you can do is add the following templates to the template cache at the beginning of the file -authority_list, forumhome_quicksearch, forumhome_dropdownbit, forumhome_quote, forumhome_newforumthreads.

You also have a query that appears to be counting the number of threads since a certain time for every forum, which is adding about 50 queries to your page -
SELECT COUNT(threadid) AS total FROM thread WHERE dateline>1057849698 and forumid=XX

Add those templates to the template cache, find that query above & remove it, and the number of queries should be a fraction of what they are now.
How do I had those things you said to the template cache?
Reply With Quote
  #8  
Old 07-12-2003, 01:33 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In index.php, look for

PHP Code:
$templatesused=
And add templates you are calling that are not cached into that line.
Reply With Quote
  #9  
Old 07-12-2003, 02:52 AM
Gutspiller's Avatar
Gutspiller Gutspiller is offline
 
Join Date: Dec 2001
Posts: 1,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I added those others into the cache thingy and it took it down to a whole 98.

What are you saying I should do with the "SELECT COUNT(threadid) AS total FROM thread WHERE dateline>1057849698 and forumid=XX"? Or are you just saying that's the line that's causing the 50 or so queries? Where'd you find that? and if it is slowing down the page a lot, I will remove it?
Reply With Quote
  #10  
Old 07-12-2003, 03:36 AM
Gutspiller's Avatar
Gutspiller Gutspiller is offline
 
Join Date: Dec 2001
Posts: 1,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

UPDATE: WOW! I notice a huge improvement in the time it takes to load my forum frontpage. What about the mod column? I removed the code, but somebody was saying that the coding was still inside the index file. Can somebody help me out on where the code begins and ends that I need to remove? I looked at that optimzing the frontpage hack the filburt way and I couldn't find where I was suppose to find the code to take out.

I had another question for you guys. My frontpage news page loads really slow, is it possible to do any of this same type of caching so that it loads up faster too? the page that I'm talking about is this one: http://www.3dNewz.com It's the same site as http://www.TheForumz.com. Can anybody help me with that?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:24 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
  • Page Generation 0.04394 seconds
  • Memory Usage 2,258KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete