Announcement

Collapse
No announcement yet.

Debug mode

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Debug mode

    I've just enabled Debug mode (3.8.4) and i've noticed that Option is pulling 127 queries, When i look at the option template its just one line of code, My question is why is it so high and what is option's role?? Do i need it or can I reduce it from 127 at all or is that normal?
    Queries / Template
    (1) navbar
    (2) navbar_link
    (10) navbar_notifications_menubit
    (127) option
    (1) spacer_close
    (1) spacer_open


    Option
    PHP Code:
    <option value="$optionvalueclass="$optionclass$optionselected>$optiontitle</option

  • #2
    What page are you on? And is this a custom query?

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools &lt;- awesome site for html/css help

    Comment


    • #3
      Hi Lynne, That was on the homepage (vbadvanced) but its now showing 3 queries, But i just went onto the Site Rules page which has 4 threads with just the one post in each and its back upto 127

      The info is from the KX Debug mode plugin..

      Comment


      • #4
        You should find out what query it is running so much and then optimize it (in debug mode, there is a (?) you may click to show all the queries). If it's just a template, then that is no biggie, but if it is really that many queries, then that is a lot.

        Please don't PM or VM me for support - I only help out in the threads.
        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
        Want help modifying your vbulletin forum? Head on over to vbulletin.org
        If I post CSS and you don't know where it goes, throw it into the additional.css template.

        W3Schools &lt;- awesome site for html/css help

        Comment


        • #5
          Thank you for your help Lynne.
          I might be getting this wrong, because the total queries shows up as 23, but "option" shows 127 in brackets (127), Is that how many queries option used or is using??

          This is what I get when I press the ?


          SQL Query
          SELECT *FROM datastoreWHERE title IN ('adv_links_cats','wol_spiders','nex_crawlers_list_wgo_stats')idselect_typetabletypepossib le_keyskeykey_lenrefrowsExtra1SIMPLEdatastorerangePRIMARYPRIMARY50 3Using whereTime Before: 0.03398 seconds
          Time After: 0.03418 seconds
          Time Taken: 0.00020 seconds
          Memory Before: 11,821.922 KB
          Memory After: 11,823.320 KB
          Memory Used: 1.398 KB


          Session Handling
          SQL Query
          SELECT *FROM sessionWHERE sessionhash = '77e4e2335a1e2ea44fa2c708d463bf14' AND lastactivity > 1254078282 AND idhash = '69ef525d9150f9a5969194e1f6a992f1'idselect_typetabletypepossible_keyskeykey_lenrefrowsExtr a1SIMPLEsessionconstPRIMARYPRIMARY32const1 Time Before: 0.03507 seconds
          Time After: 0.03522 seconds
          Time Taken: 0.00016 seconds
          Memory Before: 11,908.984 KB
          Memory After: 11,909.914 KB
          Memory Used: 0.930 KB


          SQL Query
          SELECT userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate, user.languageid AS saved_languageid, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid FROM user AS userLEFT JOIN userfield AS userfield ON (user.userid = userfield.userid)LEFT JOIN usertextfield AS usertextfield ON (usertextfield.userid = user.userid) WHERE user.userid = 2idselect_typetabletypepossible_keyskeykey_lenrefrowsExtra1SIMPLEuserconstPRIMARYPRIMARY4c onst1 1SIMPLEuserfieldconstPRIMARYPRIMARY4const1 1SIMPLEusertextfieldconstPRIMARYPRIMARY4const1 Time Before: 0.03758 seconds
          Time After: 0.03800 seconds
          Time Taken: 0.00042 seconds
          Memory Before: 12,101.484 KB
          Memory After: 12,102.188 KB
          Memory Used: 0.703 KB


          Time Before: 0.03463 seconds
          Time After: 0.03884 seconds
          Time Taken: 0.00420 seconds
          Memory Before: 11,902.188 KB
          Memory After: 12,142.188 KB
          Memory Used: 240.000 KB


          SQL Query
          SELECT noticeidFROM noticedismissed AS noticedismissedWHERE noticedismissed.userid = 2idselect_typetabletypepossible_keyskeykey_lenrefrowsExtra1SIMPLE Impossible WHERE noticed after reading const tablesTime Before: 0.06838 seconds
          Time After: 0.06851 seconds
          Time Taken: 0.00012 seconds
          Memory Before: 13,750.516 KB
          Memory After: 13,751.523 KB
          Memory Used: 1.008 KB


          End call of global.php: 0.071729898452759
          SQL Query
          SELECT subscribeforumid, forum.forumid, lastpost, lastposter, lastthread, lastthreadid, lasticonid, threadcount, replycount, lastpostid, lastprefixid FROM forum AS forumLEFT JOIN subscribeforum AS subscribeforum ON (subscribeforum.forumid = forum.forumid AND subscribeforum.userid = 2)idselect_typetabletypepossible_keyskeykey_lenrefrowsExtra1SIMPLEsubscribeforumsystem 0const row not found1SIMPLEforumALL 170 Time Before: 0.07727 seconds
          Time After: 0.07795 seconds
          Time Taken: 0.00068 seconds
          Memory Before: 13,915.008 KB
          Memory After: 13,915.813 KB
          Memory Used: 0.805 KB


          SQL Query
          SELECT moderator.*, user.username,IF(user.displaygroupid = 0, user.usergroupid, user.displaygroupid) AS displaygroupid, infractiongroupidFROM moderator AS moderatorINNER JOIN user AS user USING(userid)idselect_typetabletypepossible_keyskeykey_lenrefrowsExtra1SIMPLEmoderatorALLu serid_forumid 35 1SIMPLEusereq_refPRIMARYPRIMARY4game.moderator.userid1 Time Before: 0.08248 seconds
          Time After: 0.08282 seconds
          Time Taken: 0.00034 seconds
          Memory Before: 14,259.875 KB
          Memory After: 14,260.781 KB
          Memory Used: 0.906 KB


          SQL Query
          SELECT user.username, (user.options & 512) AS invisible, user.usergroupid, session.userid, session.inforum, session.lastactivity, session.badlocation, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupidFROM session AS sessionLEFT JOIN user AS user ON(user.userid = session.userid)WHERE session.lastactivity > 1254078282ORDER BY username ASC, lastactivity DESCidselect_typetabletypepossible_keyskeykey_lenrefrowsExtra1SIMPLEsessionALL 2Using where; Using temporary; Using filesort1SIMPLEusereq_refPRIMARYPRIMARY4game.session.userid1 Time Before: 0.08576 seconds
          Time After: 0.08606 seconds
          Time Taken: 0.00030 seconds
          Memory Before: 14,362.086 KB
          Memory After: 14,362.766 KB
          Memory Used: 0.680 KB


          SQL Query
          SELECT userid, lastactivity, useragentFROM sessionWHERE lastactivity > 1254078282AND userid = 0AND inforum = 202idselect_typetabletypepossible_keyskeykey_lenrefrowsExtra1SIMPLEsessionALL 2Using whereTime Before: 0.10412 seconds
          Time After: 0.10429 seconds
          Time Taken: 0.00017 seconds
          Memory Before: 14,913.172 KB
          Memory After: 14,914.172 KB
          Memory Used: 1.000 KB


          SQL Query
          UPDATE sessionSET lastactivity = 1254079182, location = '/forumdisplay.php?f=202', inforum = 202, inthread = 0, incalendar = 0, badlocation = 0, useragent = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729)'WHERE sessionhash = '77e4e2335a1e2ea44fa2c708d463bf14'Time Before: 0.17580 seconds
          Time After: 0.17611 seconds
          Time Taken: 0.00031 seconds
          Memory Before: 17,070.313 KB
          Memory After: 17,070.875 KB
          Memory Used: 0.563 KB


          SQL Query
          UPDATE userSET lastactivity = 1254079182WHERE userid = 2Time Before: 0.17622 seconds
          Time After: 0.17646 seconds
          Time Taken: 0.00025 seconds
          Memory Before: 17,063.594 KB
          Memory After: 17,064.508 KB
          Memory Used: 0.914 KB


          Page generated in 0.10643696784973 seconds with 23 queries, spending 0.0066685676574707 doing MySQL queries and 0.099768400192261 doing PHP things.

          Comment


          • #6
            I think you are reading it wrong - although you said this is from a modification, and maybe I am just reading his mod wrong. In regular vbulletin debug mode, you get a screen at the bottom and it clearly states what each list is (Template Usage, Phrase Groups Available, etc). Queries are also clearly labeled. If stuff isn't clearly labeled for you, then perhaps you should ask in the modification thread for someone to help you decifer what you are seeing.

            Please don't PM or VM me for support - I only help out in the threads.
            vBulletin Manual & vBulletin 4.0 Code Documentation (API)
            Want help modifying your vbulletin forum? Head on over to vbulletin.org
            If I post CSS and you don't know where it goes, throw it into the additional.css template.

            W3Schools &lt;- awesome site for html/css help

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X