Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Site Bugs / Suggestions
  4. Slow lounge link

Slow lounge link

Scheduled Pinned Locked Moved Site Bugs / Suggestions
questioncom
11 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    WoutL
    wrote on last edited by
    #1

    Why does loading the lounge directly via www.codeproject.com/lounge take forever while going vai the main page and click on the first lounge message loads instantly?

    Wout Louwers

    C C 2 Replies Last reply
    0
    • W WoutL

      Why does loading the lounge directly via www.codeproject.com/lounge take forever while going vai the main page and click on the first lounge message loads instantly?

      Wout Louwers

      C Offline
      C Offline
      Corporal Agarn
      wrote on last edited by
      #2

      I have not noticed this. Seems about the same to me.

      1 Reply Last reply
      0
      • W WoutL

        Why does loading the lounge directly via www.codeproject.com/lounge take forever while going vai the main page and click on the first lounge message loads instantly?

        Wout Louwers

        C Offline
        C Offline
        Chris Maunder
        wrote on last edited by
        #3

        Is it a particular server? (look at the very bottom of the page under the bottom banner - you'll see the server name)

        cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

        W 2 Replies Last reply
        0
        • C Chris Maunder

          Is it a particular server? (look at the very bottom of the page under the bottom banner - you'll see the server name)

          cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

          W Offline
          W Offline
          WoutL
          wrote on last edited by
          #4

          No, it is not the server. But when I go to the lounge and hit 'refresh' the loading of the page takes a lot of time. Sometimes even longr then 30 seconds. And after 30 seconds you get a 'busy server' message. But when I use a permalink and hit refresh, the page loads within 5 seconds.

          Wout Louwers

          1 Reply Last reply
          0
          • C Chris Maunder

            Is it a particular server? (look at the very bottom of the page under the bottom banner - you'll see the server name)

            cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

            W Offline
            W Offline
            WoutL
            wrote on last edited by
            #5

            Chris, Ii am not the only one who notices this behaviour: Message from th Lounge[^]. Could it have to do with "SQL parameter sniffing"?

            Wout Louwers

            C 1 Reply Last reply
            0
            • W WoutL

              Chris, Ii am not the only one who notices this behaviour: Message from th Lounge[^]. Could it have to do with "SQL parameter sniffing"?

              Wout Louwers

              C Offline
              C Offline
              Chris Maunder
              wrote on last edited by
              #6

              We're still trying to find out why the sudden load and unfortunately nothing obvious is sticking it's head up. We're not ignoring - just digging deeply.

              cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

              W 1 Reply Last reply
              0
              • C Chris Maunder

                We're still trying to find out why the sudden load and unfortunately nothing obvious is sticking it's head up. We're not ignoring - just digging deeply.

                cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

                W Offline
                W Offline
                WoutL
                wrote on last edited by
                #7

                Chris, Although I do not know how the site works, I can imagine that the messages for the lounge are loaded by a single stored procedure. And that the same stored procedure is used for loading the lounge main page or loading a permalink to a message in the lounge. If this is how it works, the procedure will have parameters that sometimes have values and sometime are NULL. If this is the case, the stored procedure would need different execution plans for different situations, and that is one thing where MSSQL is not at his best. If you have a test system (with a similar amount of messages) you could test this as follows:

                • Run the stored procedure with different situations and look at the execution plan.
                • Change the sp. The only thing you have to change is saving it with "with recompile"
                • Run the previous situations again and compare the outcomes.

                If there are differences you have two options: Add the 'with recompile' to the production systems, or split the single sp in two or more variants so they can have there own execution plans. As mentioned before: I don’t know how your site works. I am only a member who is trying to help.

                Wout Louwers

                C 1 Reply Last reply
                0
                • W WoutL

                  Chris, Although I do not know how the site works, I can imagine that the messages for the lounge are loaded by a single stored procedure. And that the same stored procedure is used for loading the lounge main page or loading a permalink to a message in the lounge. If this is how it works, the procedure will have parameters that sometimes have values and sometime are NULL. If this is the case, the stored procedure would need different execution plans for different situations, and that is one thing where MSSQL is not at his best. If you have a test system (with a similar amount of messages) you could test this as follows:

                  • Run the stored procedure with different situations and look at the execution plan.
                  • Change the sp. The only thing you have to change is saving it with "with recompile"
                  • Run the previous situations again and compare the outcomes.

                  If there are differences you have two options: Add the 'with recompile' to the production systems, or split the single sp in two or more variants so they can have there own execution plans. As mentioned before: I don’t know how your site works. I am only a member who is trying to help.

                  Wout Louwers

                  C Offline
                  C Offline
                  Chris Maunder
                  wrote on last edited by
                  #8

                  I'll pass these suggestions on. We tend to tune specifically for the core scenarios and typically the exectution plan is sensible (well, sensible after we've wrestled it into submission with index hints). SQL Server is terrible at making guesses sometimes.

                  cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

                  W 1 Reply Last reply
                  0
                  • C Chris Maunder

                    I'll pass these suggestions on. We tend to tune specifically for the core scenarios and typically the exectution plan is sensible (well, sensible after we've wrestled it into submission with index hints). SQL Server is terrible at making guesses sometimes.

                    cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

                    W Offline
                    W Offline
                    WoutL
                    wrote on last edited by
                    #9

                    Chris Maunder wrote:

                    SQL Server is terrible at making guesses sometimes.

                    O yes, I know. Thats why you have to split the sp's sometimes. The main sp can still exist, so you doe not have to change other code, but if you let that sp call different sp's, you help SQL to choose its indexes. It is sometimes more simple than working with idex hints.

                    Wout Louwers

                    C 1 Reply Last reply
                    0
                    • W WoutL

                      Chris Maunder wrote:

                      SQL Server is terrible at making guesses sometimes.

                      O yes, I know. Thats why you have to split the sp's sometimes. The main sp can still exist, so you doe not have to change other code, but if you let that sp call different sp's, you help SQL to choose its indexes. It is sometimes more simple than working with idex hints.

                      Wout Louwers

                      C Offline
                      C Offline
                      Chris Maunder
                      wrote on last edited by
                      #10

                      We think we've solved the proble,. The trick: removing an index. SQL Server can suffer a problem whereby it doesn't have time to evaluate the indexes properly so chooses the wrong one.

                      cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

                      W 1 Reply Last reply
                      0
                      • C Chris Maunder

                        We think we've solved the proble,. The trick: removing an index. SQL Server can suffer a problem whereby it doesn't have time to evaluate the indexes properly so chooses the wrong one.

                        cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

                        W Offline
                        W Offline
                        WoutL
                        wrote on last edited by
                        #11

                        Never knew a select query could benefit from removing an index. So I allready learned somthing new today. And my workday has just started!

                        Wout Louwers

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups