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. Database & SysAdmin
  3. Database
  4. Sql server 2008 R2 Express Edition working very slow why?

Sql server 2008 R2 Express Edition working very slow why?

Scheduled Pinned Locked Moved Database
databasesql-serversysadminhostingperformance
18 Posts 8 Posters 5 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.
  • S Offline
    S Offline
    Sandeep Tripathi
    wrote on last edited by
    #1

    Hello sir, I have dedicated server with 8 Gb RAM.I have developed the CRM when multiple user working at a time Sql server working very slow task is going on suspended. Sql server 2008 R2 Express Edition Database Size=6Gb Maximum Memory=2147483647 Mb Minimum Memory Per query=1024 kb Pls.... suggest

    L T D J M 6 Replies Last reply
    0
    • S Sandeep Tripathi

      Hello sir, I have dedicated server with 8 Gb RAM.I have developed the CRM when multiple user working at a time Sql server working very slow task is going on suspended. Sql server 2008 R2 Express Edition Database Size=6Gb Maximum Memory=2147483647 Mb Minimum Memory Per query=1024 kb Pls.... suggest

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Is it a 64-bit version? Using a 64-bit OS?

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

      S 1 Reply Last reply
      0
      • L Lost User

        Is it a 64-bit version? Using a 64-bit OS?

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

        S Offline
        S Offline
        Sandeep Tripathi
        wrote on last edited by
        #3

        Yes it's 64 bit OS and Microsoft SQL Server Express Edition with Advanced Services (64-bit)

        L 1 Reply Last reply
        0
        • S Sandeep Tripathi

          Yes it's 64 bit OS and Microsoft SQL Server Express Edition with Advanced Services (64-bit)

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          How did you determine it is "slow"? Do you have an example query executed on the database-server itself?

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

          S 1 Reply Last reply
          0
          • L Lost User

            How did you determine it is "slow"? Do you have an example query executed on the database-server itself?

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

            S Offline
            S Offline
            Sandeep Tripathi
            wrote on last edited by
            #5

            When multiple user working at a time.Maximum task is suspended for this reason sql fetch data very slow.

            K L 2 Replies Last reply
            0
            • S Sandeep Tripathi

              When multiple user working at a time.Maximum task is suspended for this reason sql fetch data very slow.

              K Offline
              K Offline
              Krishna Murthy G
              wrote on last edited by
              #6

              1. Check for min and max memory configuration 2. Check is your procedure is creating any locks

              Krishna Murthy G

              S 1 Reply Last reply
              0
              • K Krishna Murthy G

                1. Check for min and max memory configuration 2. Check is your procedure is creating any locks

                Krishna Murthy G

                S Offline
                S Offline
                Sandeep Tripathi
                wrote on last edited by
                #7

                Sql server Maximum Memory=2147483647 Mb Manimum Memory=0 Mb Minimum Memory Per query=1024 kb and procedure is not creating any locks.

                1 Reply Last reply
                0
                • S Sandeep Tripathi

                  Hello sir, I have dedicated server with 8 Gb RAM.I have developed the CRM when multiple user working at a time Sql server working very slow task is going on suspended. Sql server 2008 R2 Express Edition Database Size=6Gb Maximum Memory=2147483647 Mb Minimum Memory Per query=1024 kb Pls.... suggest

                  T Offline
                  T Offline
                  Tim Carmichael
                  wrote on last edited by
                  #8

                  Sandeep Tripathi wrote:

                  8 Gb RAM

                  Sandeep Tripathi wrote:

                  Maximum Memory=2147483647 Mb

                  Why is the maximum memory SQLServer is allowed to use higher than the available memory? Reduce the maximum memory SQLServer can use.

                  S 1 Reply Last reply
                  0
                  • S Sandeep Tripathi

                    When multiple user working at a time.Maximum task is suspended for this reason sql fetch data very slow.

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    How many users? If they're all hitting a large table without index, then I'd expect it to perform slowly. Can you give us an example of a typical query that is slow? How many of those are reads and how many updates/inserts? The latter does create a lock, and would require updating of the index. Needs more details :)

                    Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                    1 Reply Last reply
                    0
                    • T Tim Carmichael

                      Sandeep Tripathi wrote:

                      8 Gb RAM

                      Sandeep Tripathi wrote:

                      Maximum Memory=2147483647 Mb

                      Why is the maximum memory SQLServer is allowed to use higher than the available memory? Reduce the maximum memory SQLServer can use.

                      S Offline
                      S Offline
                      Sandeep Tripathi
                      wrote on last edited by
                      #10

                      40 Users used every time. Maximum Memory ? I am sending proc who is working very slow . /* exec Visa_new_pending_followup_sel_final_new 'PCOMP/000002','','','','','','' */ CREATE PROC Visa_new_pending_followup_sel_final_new (@Comp_code VARCHAR(20), @username VARCHAR(50), @country VARCHAR(50) = NULL, @username_S VARCHAR(100), @adv_search VARCHAR(5) = NULL, @yrs VARCHAR(5) = NULL, @month VARCHAR(3) = NULL) AS BEGIN SET nocount ON; DECLARE @user_type VARCHAR(2) SELECT @user_type = super_user FROM crm_login_reg_tbl (nolock) WHERE username = @username AND company_code = @Comp_code IF Isnull(Len(Ltrim(Rtrim(@username_S))), 0) = 0 BEGIN SELECT @username_S = NULL END DECLARE @temp TABLE ( username VARCHAR(200), lead_code VARCHAR(200), acc_code VARCHAR(200), acc_name VARCHAR(200), case_code VARCHAR(200), subject VARCHAR(500), follow_up_code VARCHAR(200), follow_up_date_ DATETIME, follow_up_time VARCHAR(10), followup_status_desc VARCHAR(100), creation_date VARCHAR(20), created_by VARCHAR(100), ref_type VARCHAR(100), cont_code VARCHAR(100), deadline_status VARCHAR(1), deadline_date_ DATETIME, deadline_reason VARCHAR(1000) ) IF ( @user_type IN ( 'G' ) ) BEGIN INSERT INTO @temp SELECT a.username

                      L C 2 Replies Last reply
                      0
                      • S Sandeep Tripathi

                        Hello sir, I have dedicated server with 8 Gb RAM.I have developed the CRM when multiple user working at a time Sql server working very slow task is going on suspended. Sql server 2008 R2 Express Edition Database Size=6Gb Maximum Memory=2147483647 Mb Minimum Memory Per query=1024 kb Pls.... suggest

                        T Offline
                        T Offline
                        Tim Carmichael
                        wrote on last edited by
                        #11

                        Let's try this again... If the computer has ONLY 8 GB of physical memory available to it and you are allowing SQLServer to use over 214,000 GB of physical memory, where is it coming from? From Microsoft: Allowing SQL Server to use memory dynamically is recommended; however, you can set the memory options manually and restrict the amount of memory that SQL Server can access. Before you set the amount of memory for SQL Server, determine the appropriate memory setting by subtracting, from the total physical memory, the memory required for the OS and any other instances of SQL Server (and other system uses, if the computer is not wholly dedicated to SQL Server). This difference is the maximum amount of memory you can assign to SQL Server. What is the physical memory? 8 GB How much does the OS need? Let's say 2 GB How much is left for SQL? 6 GB Set your SQLServer maximum memory to a more reasonable value and then report what happens.

                        S 1 Reply Last reply
                        0
                        • T Tim Carmichael

                          Let's try this again... If the computer has ONLY 8 GB of physical memory available to it and you are allowing SQLServer to use over 214,000 GB of physical memory, where is it coming from? From Microsoft: Allowing SQL Server to use memory dynamically is recommended; however, you can set the memory options manually and restrict the amount of memory that SQL Server can access. Before you set the amount of memory for SQL Server, determine the appropriate memory setting by subtracting, from the total physical memory, the memory required for the OS and any other instances of SQL Server (and other system uses, if the computer is not wholly dedicated to SQL Server). This difference is the maximum amount of memory you can assign to SQL Server. What is the physical memory? 8 GB How much does the OS need? Let's say 2 GB How much is left for SQL? 6 GB Set your SQLServer maximum memory to a more reasonable value and then report what happens.

                          S Offline
                          S Offline
                          Sandeep Tripathi
                          wrote on last edited by
                          #12

                          Ok , set Server maximum memory=6 Gb. after that?

                          T 1 Reply Last reply
                          0
                          • S Sandeep Tripathi

                            Ok , set Server maximum memory=6 Gb. after that?

                            T Offline
                            T Offline
                            Tim Carmichael
                            wrote on last edited by
                            #13

                            Set the maximum amount of memory and stop/start the SQLServer engine (or restart the computer). Check system performance including Task Manager. How much memory is still available? If SQLServer uses too much memory, the operating system is forced to use page files and thrash the hard drive.

                            1 Reply Last reply
                            0
                            • S Sandeep Tripathi

                              40 Users used every time. Maximum Memory ? I am sending proc who is working very slow . /* exec Visa_new_pending_followup_sel_final_new 'PCOMP/000002','','','','','','' */ CREATE PROC Visa_new_pending_followup_sel_final_new (@Comp_code VARCHAR(20), @username VARCHAR(50), @country VARCHAR(50) = NULL, @username_S VARCHAR(100), @adv_search VARCHAR(5) = NULL, @yrs VARCHAR(5) = NULL, @month VARCHAR(3) = NULL) AS BEGIN SET nocount ON; DECLARE @user_type VARCHAR(2) SELECT @user_type = super_user FROM crm_login_reg_tbl (nolock) WHERE username = @username AND company_code = @Comp_code IF Isnull(Len(Ltrim(Rtrim(@username_S))), 0) = 0 BEGIN SELECT @username_S = NULL END DECLARE @temp TABLE ( username VARCHAR(200), lead_code VARCHAR(200), acc_code VARCHAR(200), acc_name VARCHAR(200), case_code VARCHAR(200), subject VARCHAR(500), follow_up_code VARCHAR(200), follow_up_date_ DATETIME, follow_up_time VARCHAR(10), followup_status_desc VARCHAR(100), creation_date VARCHAR(20), created_by VARCHAR(100), ref_type VARCHAR(100), cont_code VARCHAR(100), deadline_status VARCHAR(1), deadline_date_ DATETIME, deadline_reason VARCHAR(1000) ) IF ( @user_type IN ( 'G' ) ) BEGIN INSERT INTO @temp SELECT a.username

                              L Offline
                              L Offline
                              Lost User
                              wrote on last edited by
                              #14

                              Ah.. So, your SQL server is not slow. It is under a lot of load, too many users and an inefficient sproc. Remove as much of the functions as possible, stop formatting the fields in the database and do that from code.

                              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                              1 Reply Last reply
                              0
                              • S Sandeep Tripathi

                                Hello sir, I have dedicated server with 8 Gb RAM.I have developed the CRM when multiple user working at a time Sql server working very slow task is going on suspended. Sql server 2008 R2 Express Edition Database Size=6Gb Maximum Memory=2147483647 Mb Minimum Memory Per query=1024 kb Pls.... suggest

                                D Offline
                                D Offline
                                David Mujica
                                wrote on last edited by
                                #15

                                Have you tried using SQL Profiler to determine which Stored Procedure or SQL statement is causing the issue ? You may discover that the query could be improved by adding an index. Good luck. :thumbsup:

                                1 Reply Last reply
                                0
                                • S Sandeep Tripathi

                                  40 Users used every time. Maximum Memory ? I am sending proc who is working very slow . /* exec Visa_new_pending_followup_sel_final_new 'PCOMP/000002','','','','','','' */ CREATE PROC Visa_new_pending_followup_sel_final_new (@Comp_code VARCHAR(20), @username VARCHAR(50), @country VARCHAR(50) = NULL, @username_S VARCHAR(100), @adv_search VARCHAR(5) = NULL, @yrs VARCHAR(5) = NULL, @month VARCHAR(3) = NULL) AS BEGIN SET nocount ON; DECLARE @user_type VARCHAR(2) SELECT @user_type = super_user FROM crm_login_reg_tbl (nolock) WHERE username = @username AND company_code = @Comp_code IF Isnull(Len(Ltrim(Rtrim(@username_S))), 0) = 0 BEGIN SELECT @username_S = NULL END DECLARE @temp TABLE ( username VARCHAR(200), lead_code VARCHAR(200), acc_code VARCHAR(200), acc_name VARCHAR(200), case_code VARCHAR(200), subject VARCHAR(500), follow_up_code VARCHAR(200), follow_up_date_ DATETIME, follow_up_time VARCHAR(10), followup_status_desc VARCHAR(100), creation_date VARCHAR(20), created_by VARCHAR(100), ref_type VARCHAR(100), cont_code VARCHAR(100), deadline_status VARCHAR(1), deadline_date_ DATETIME, deadline_reason VARCHAR(1000) ) IF ( @user_type IN ( 'G' ) ) BEGIN INSERT INTO @temp SELECT a.username

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

                                  Why are us using Express with 40 users? Why are us taking a date and converting it to VARCHAR to compare?

                                  Mongo: Mongo only pawn... in game of life.

                                  1 Reply Last reply
                                  0
                                  • S Sandeep Tripathi

                                    Hello sir, I have dedicated server with 8 Gb RAM.I have developed the CRM when multiple user working at a time Sql server working very slow task is going on suspended. Sql server 2008 R2 Express Edition Database Size=6Gb Maximum Memory=2147483647 Mb Minimum Memory Per query=1024 kb Pls.... suggest

                                    J Offline
                                    J Offline
                                    jschell
                                    wrote on last edited by
                                    #17

                                    I will note that I have tested an application that was running 100 TPS (Transactions Per second) sustained on 32 bit machines where every transaction was hitting the database multiple times on a network with multiple client machines, a single app server and a single database server (again 32 bit with 2 CPUs.) And I was never able to get the CPU on the database server machine to go above about 3%. The database was never even close to being a bottleneck. I seriously doubt that 40 human users doing normal click through work would even be able to touch a 64 bit machine on even a adequately designed system. Normal performance problems are as follows from most to least 1. Requirements (most impact) 2. Architecture/Design 3. Implementation 4. Technology (network, language, OS, etc.) (least impact) Now as per the other threads very badly configuring a server could have an impact. But so can 1-3 in the above. If it is the database server then reinstalling and accepting all of the defaults would return it to the base line and that would be more than adequate for very long time even with a substantial increase in human users. If of course 1-3 are done right.

                                    1 Reply Last reply
                                    0
                                    • S Sandeep Tripathi

                                      Hello sir, I have dedicated server with 8 Gb RAM.I have developed the CRM when multiple user working at a time Sql server working very slow task is going on suspended. Sql server 2008 R2 Express Edition Database Size=6Gb Maximum Memory=2147483647 Mb Minimum Memory Per query=1024 kb Pls.... suggest

                                      M Offline
                                      M Offline
                                      Mycroft Holmes
                                      wrote on last edited by
                                      #18

                                      Well I have seen some horror stored procs in my time and this one is particularly nasty. Split the proc in multiples procedures to return 1 dataset each, multiple dataset can destroy the performance. You have business logic in your stored proc (c.title and followupstatus should be reference/dimension tables) You are formatting dates in the database, leave that to the client. This looks like a complete horror - looks like you are storing date & time when you really only need the date and this kludge it trying to deal with it.

                                      	WHERE ((CONVERT(NVARCHAR(10), a.follow\_up\_date\_, 121) + ' ' + CONVERT(CHAR(5), CAST(a.follow\_up\_time AS DATETIME), 108)) < (CONVERT(VARCHAR(16), GETDATE(), 121)))
                                      		AND (CONVERT(NVARCHAR(MAX), a.follow\_up\_date\_, 101) + ' ' + CONVERT(NVARCHAR(MAX), SUBSTRING(a.follow\_up\_time, 1, 5), 108)) <= (CONVERT(VARCHAR(16), GETDATE(), 120)) 
                                      

                                      Try using datetime data type, BETWEEN may be useful to you. This seems to indicate you are storing your dates as varchar -

                                      ORDER BY CONVERT(DATETIME, follow_up_date) DESC

                                      one of the most basic and expensive errors a database designer can make. I don't think you can blame the database server if this is what you are asking it to deal with. When you have cleaned up the errors you should then use profiler to determine if indexes can improve the performance.

                                      Never underestimate the power of human stupidity RAH

                                      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