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 06-17-2007, 03:40 PM
vbreal vbreal is offline
 
Join Date: Dec 2005
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to lower the number of queries?

i have been having some minor issues with my site. it seems to use a slot of server resources. Its been going on for months. i have tracked it down to mysql queries. so i figured it was one or a few of my mods. so i began to disable them. before i started my forum home page would show 58 queries after i turned off all mods but the debug mod it shows 48 queries. when i go to whose online it shows up to 60. when i log in to my admin panel it shows 48 quires. why would so many queries run when i am logging in to admin cp. could there be something in the background i am not aware about. i don't believe these numbers are normal with all mods off. i am running version 3.6.4.

anyone have any idea what my issue could be or something else i can do to minimize my queries.

thanks in advance!!
Reply With Quote
  #2  
Old 06-17-2007, 03:42 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Use the explain functionality in debug mode to see what the queries are, then you can try and track down what is causing them.
Reply With Quote
  #3  
Old 06-17-2007, 03:52 PM
vbreal vbreal is offline
 
Join Date: Dec 2005
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

when i click on that nothing happens. it refreshes the page that i am on at the time.

thanks
Reply With Quote
  #4  
Old 06-18-2007, 06:31 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How are you implementing the debug function?
Reply With Quote
  #5  
Old 06-18-2007, 01:54 PM
vbreal vbreal is offline
 
Join Date: Dec 2005
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am using this mod
https://vborg.vbsupport.ru/showthread.php?t=130212

this query is showed up 30 times when i added the debug line in my config.php
the mod doesnt show the explain page.

Quote:
SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(customavatar.userid) AS hascustom, customavatar.dateline,
customavatar.width, customavatar.height
FROM tluser AS user
LEFT JOIN tlavatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN tlcustomavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.userid = 1


all my mods are off but the debug mod. just a few minutes ago my server failed because of the high number of queries. i don't get how there are so many queries with my mods off.




had like 30 returning smilies messages also.
Reply With Quote
  #6  
Old 06-19-2007, 06:53 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What is pagerlogbit ?

Given it's called 30 times and is not part of standard vb, I would start looking at that.
Reply With Quote
  #7  
Old 06-20-2007, 09:01 AM
vbreal vbreal is offline
 
Join Date: Dec 2005
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks paul that was it. it was for this mod https://vborg.vbsupport.ru/showthrea...hlight=vbpager

i am now down to 30. haven't had any issues since yesterday. whats an average number of queries for boards with mods a good bit of mods on them?

X vBulletin 3.6.7 Debug Information
  • <LI class=smallfont style="DISPLAY: inline; MARGIN-RIGHT: 8px">Page Generation 1.68843 seconds
  • Queries Executed 30 (?)
More InformationTemplate Usage:
  • <LI class=smallfont>(1)Display_Visitors <LI class=smallfont>(1)FORUMHOME <LI class=smallfont>(1)banner <LI class=smallfont>(1)footer <LI class=smallfont>(7)forumhome_forumbit_level1_nopos t <LI class=smallfont>(29)forumhome_forumbit_level2_post <LI class=smallfont>(35)forumhome_lastpostby <LI class=smallfont>(4)forumhome_loggedinuser <LI class=smallfont>(1)forumhome_markread_script <LI class=smallfont>(9)forumhome_subforumbit_post <LI class=smallfont>(1)forumhome_subforumseparator_pos t <LI class=smallfont>(1)gobutton <LI class=smallfont>(1)header <LI class=smallfont>(1)headinclude <LI class=smallfont>(1)navbar <LI class=smallfont>(19)option <LI class=smallfont>(1)spacer_close <LI class=smallfont>(1)spacer_open <LI class=smallfont>(1)topwifi_forumhome
  • (1)zointsprofile_popup_navbar
Included Files:
  • <LI class=smallfont>forum.php <LI class=smallfont>global.php <LI class=smallfont>includes/init.php <LI class=smallfont>includes/class_core.php <LI class=smallfont>includes/config.php <LI class=smallfont>includes/functions.php <LI class=smallfont>includes/class_hook.php <LI class=smallfont>plugins/vbplaza_cache_templates.php <LI class=smallfont>geek/gars/includes/gars_ignition.php <LI class=smallfont>plugins/vbplaza_global_start.php <LI class=smallfont>includes/visionscripts/psionic_hide/global_start.php <LI class=smallfont>includes/functions_user.php <LI class=smallfont>includes/functions_bigthree.php <LI class=smallfont>includes/functions_forumlist.php
  • includes/functions_calendar.php
Hooks Called:
  • <LI class="smallfont shade">init_startup <LI class="smallfont shade">fetch_userinfo_query <LI class="smallfont shade">fetch_musername <LI class="smallfont shade">fetch_userinfo <LI class=smallfont>style_fetch <LI class=smallfont>cache_templates <LI class=smallfont>global_start <LI class=smallfont>parse_templates <LI class="smallfont shade">global_setup_complete <LI class=smallfont>forumhome_start <LI class="smallfont shade">forumhome_loggedinuser <LI class="smallfont shade">cache_ordered_forums <LI class=smallfont>forumbit_display <LI class=smallfont>forumbit_subforumbit
  • forumhome_complete
Messages: (unspecified) fetch_permissions(3, 1, 6,''); -> cached fperms for forum 3 (unspecified) fetch_permissions(50, 1, 6,''); -> cached fperms for forum 50 (unspecified) fetch_permissions(4, 1, 6,''); -> cached fperms for forum 4 (unspecified) fetch_permissions(40, 1, 6,''); -> cached fperms for forum 40 (unspecified) fetch_permissions(5, 1, 6,''); -> cached fperms for forum 5 (unspecified) fetch_permissions(59, 1, 6,''); -> cached fperms for forum 59 (unspecified) fetch_permissions(21, 1, 6,''); -> cached fperms for forum 21 (unspecified) fetch_permissions(29, 1, 6,''); -> cached fperms for forum 29 (unspecified) fetch_permissions(54, 1, 6,''); -> cached fperms for forum 54 (unspecified) fetch_permissions(68, 1, 6,''); -> cached fperms for forum 68 (unspecified) fetch_permissions(16, 1, 6,''); -> cached fperms for forum 16 (unspecified) fetch_permissions(22, 1, 6,''); -> cached fperms for forum 22 (unspecified) fetch_permissions(57, 1, 6,''); -> cached fperms for forum 57 (unspecified) fetch_permissions(47, 1, 6,''); -> cached fperms for forum 47 (unspecified) fetch_permissions(17, 1, 6,''); -> cached fperms for forum 17 (unspecified) fetch_permissions(15, 1, 6,''); -> cached fperms for forum 15 (unspecified) fetch_permissions(20, 1, 6,''); -> cached fperms for forum 20 (unspecified) fetch_permissions(55, 1, 6,''); -> cached fperms for forum 55 (unspecified) fetch_permissions(71, 1, 6,''); -> cached fperms for forum 71 (unspecified) fetch_permissions(70, 1, 6,''); -> cached fperms for forum 70 (unspecified) fetch_permissions(18, 1, 6,''); -> cached fperms for forum 18 (unspecified) fetch_permissions(6, 1, 6,''); -> cached fperms for forum 6 (unspecified) fetch_permissions(7, 1, 6,''); -> cached fperms for forum 7 (unspecified) fetch_permissions(14, 1, 6,''); -> cached fperms for forum 14 (unspecified) fetch_permissions(13, 1, 6,''); -> cached fperms for forum 13 (unspecified) fetch_permissions(12, 1, 6,''); -> cached fperms for forum 12 (unspecified) fetch_permissions(8, 1, 6,''); -> cached fperms for forum 8 (unspecified) fetch_permissions(9, 1, 6,''); -> cached fperms for forum 9 (unspecified) fetch_permissions(63, 1, 6,''); -> cached fperms for forum 63 (unspecified) fetch_permissions(10, 1, 6,''); -> cached fperms for forum 10 (unspecified) fetch_permissions(66, 1, 6,''); -> cached fperms for forum 66 (unspecified) fetch_permissions(69, 1, 6,''); -> cached fperms for forum 69 (unspecified) fetch_permissions(11, 1, 6,''); -> cached fperms for forum 11 (unspecified) fetch_permissions(19, 1, 6,''); -> cached fperms for forum 19 (unspecified) fetch_permissions(56, 1, 6,''); -> cached fperms for forum 56 (unspecified) fetch_permissions(67, 1, 6,''); -> cached fperms for forum 67 (unspecified) fetch_permissions(61, 1, 6,''); -> cached fperms for forum 61 (unspecified) fetch_permissions(58, 1, 6,''); -> cached fperms for forum 58 (unspecified) fetch_permissions(27, 1, 6,''); -> cached fperms for forum 27 (unspecified) fetch_permissions(28, 1, 6,''); -> cached fperms for forum 28 (unspecified) fetch_permissions(72, 1, 6,''); -> cached fperms for forum 72 (unspecified) fetch_permissions(26, 1, 6,''); -> cached fperms for forum 26 (unspecified) fetch_permissions(62, 1, 6,''); -> cached fperms for forum 62 (unspecified) fetch_permissions(25, 1, 6,''); -> cached fperms for forum 25 (unspecified) fetch_permissions(30, 1, 6,''); -> cached fperms for forum 30 (unspecified) fetch_permissions(31, 1, 6,''); -> cached fperms for forum 31 (unspecified) fetch_permissions(32, 1, 6,''); -> cached fperms for forum 32 (unspecified) fetch_permissions(65, 1, 6,''); -> cached fperms for forum 65 (unspecified) fetch_permissions(33, 1, 6,''); -> cached fperms for forum 33 Uncached template: topwifi_forumhome returning iconid:12 from the template cache returning iconid:12 from the template cache returning iconid:3 from the template cache returning iconid:14 from the template cache returning iconid:4 from the template cache php_sapi_name(): apache


how important are uncached templates? how do u cash them? do u see anything odd about my output?
Reply With Quote
  #8  
Old 06-20-2007, 09:25 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uncached templates cause 1 query each. You should contact the authors of those templates to get this rectified.
Reply With Quote
  #9  
Old 06-20-2007, 09:55 AM
cyberphr's Avatar
cyberphr cyberphr is offline
 
Join Date: Jul 2006
Location: Hell
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Remove modifications, and remove any queries you don't think are necessary (user info in posts, maybe?).
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 02:50 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.04056 seconds
  • Memory Usage 2,249KB
  • 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_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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_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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete