Sql server 2008 R2 Express Edition working very slow why?
-
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
-
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
-
Yes it's 64 bit OS and Microsoft SQL Server Express Edition with Advanced Services (64-bit)
-
Yes it's 64 bit OS and Microsoft SQL Server Express Edition with Advanced Services (64-bit)
-
When multiple user working at a time.Maximum task is suspended for this reason sql fetch data very slow.
-
When multiple user working at a time.Maximum task is suspended for this reason sql fetch data very slow.
1. Check for min and max memory configuration 2. Check is your procedure is creating any locks
Krishna Murthy G
-
1. Check for min and max memory configuration 2. Check is your procedure is creating any locks
Krishna Murthy G
Sql server Maximum Memory=2147483647 Mb Manimum Memory=0 Mb Minimum Memory Per query=1024 kb and procedure is not creating any locks.
-
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
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.
-
When multiple user working at a time.Maximum task is suspended for this reason sql fetch data very slow.
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)
-
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.
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
-
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
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.
-
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.
Ok , set Server maximum memory=6 Gb. after that?
-
Ok , set Server maximum memory=6 Gb. after that?
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.
-
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
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)
-
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
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:
-
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
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.
-
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
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.
-
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
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