"Check Thread Subscription" - Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • telc
    Senior Member
    • Oct 2001
    • 239
    • 3.5.x

    "Check Thread Subscription" - Query

    Can someone show me where I can find this query, I am trying to determine how much of a performance impact it will have on a very large forum.

    Thanks
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    What query exactly? You don't normally query thread subscriptions because those are strictly user preference.

    Comment

    • telc
      Senior Member
      • Oct 2001
      • 239
      • 3.5.x

      #3
      Originally posted by Jake Bunce
      What query exactly? You don't normally query thread subscriptions because those are strictly user preference.
      I would like to know what extra queries are run when this is enabled in admincp:

      Check Thread Subscription [Yes] [No]

      If enabled, this option will notify the user that they are subscribed to a thread by displaying a small icon when viewing forumdisplay and search results. It will also change the "Subscribe to this thread" text on showthread to "Unsubscribe from this thread". This can have an effect on performance.

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        I had a quick look at the code but I can't find the exact query. If no one else here is able to help you then I recommend you post on www.vbulletin.org for help with the code.

        Comment

        • telc
          Senior Member
          • Oct 2001
          • 239
          • 3.5.x

          #5
          Originally posted by Jake Bunce
          I had a quick look at the code but I can't find the exact query. If no one else here is able to help you then I recommend you post on www.vbulletin.org for help with the code.

          Thanks for looking into it for me.

          Comment

          • Lats
            Senior Member
            • Mar 2002
            • 3671

            #6
            forumdisplay.php, around line 815...
            PHP Code:
            ...
              
            FROM " . TABLE_PREFIX . "thread AS thread
               $deljoin
               
            " . (($vbulletin->options['threadsubscribed'] AND $vbulletin->userinfo['userid']) ?  " LEFT JOIN " . TABLE_PREFIX . "subscribethread AS subscribethread ON(subscribethread.threadid thread.threadid AND subscribethread.userid " . $vbulletin->userinfo['userid'] . " AND canview 1)" : "") . "
               " . ((
            $vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid']) ? " LEFT JOIN " . TABLE_PREFIX . "threadread AS threadread ON (threadread.threadid thread.threadid AND threadread.userid " . $vbulletin->userinfo['userid'] . ")" : "") . "
               
            $previewjoin
               $tachyjoin
            ... 
            Lats...

            Comment

            • Freddie Bingham
              Former vBulletin Developer
              • May 2000
              • 14057
              • 1.1.x

              #7
              It is a join on a 2 column index so it shouldn't actually add much.

              Comment

              • telc
                Senior Member
                • Oct 2001
                • 239
                • 3.5.x

                #8
                I am trying to figure out why the load average is so much higher after: 3.5.1 to 3.6.2

                It would get so high at times it the site would barely load, I never had this issue in 3.5.1. All tables were optimized and repaired after the 3.6.2 upgrade.

                The only new features enabled in 3.6.2 are Reputation and Infractions.

                Last night I disabled "Check Thread Subscription" and so far it seems better, if it makes it though tonight with out slowing down, then I think this is the issue in 3.6.2.

                Sunday is where the upgrade was done, you can see the load is much higher.

                Comment

                • Jake Bunce
                  Senior Member
                  • Dec 2000
                  • 46598
                  • 3.6.x

                  #9
                  I have seen it suggested that a repair / optimize helps performance after an upgrade. You might try that.

                  Comment

                  • telc
                    Senior Member
                    • Oct 2001
                    • 239
                    • 3.5.x

                    #10
                    I tried that, as stated in the previous post.

                    "All tables were optimized and repaired after the 3.6.2 upgrade."

                    Comment

                    • Steve Machol
                      Former Customer Support Manager
                      • Jul 2000
                      • 154488

                      #11
                      Assuming you have no hacks or plugins installed all I can ssuggest is seeing this thread for help with optimizing your server:



                      Then post the requested info in a new thread in that forum.
                      Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                      Change CKEditor Colors to Match Style (for 4.1.4 and above)

                      Steve Machol Photography


                      Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                      Comment

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