How to Improve the Performance of SQL Server and/or the hardware it resides on?

There's a particular stored procedure I call from my ASP.NET 4.0 Web Forms app that generates the data for a report.  Using SQL Server Management Studio, I did some benchmarking today and found some interesting results:
FYI SQL Server Express 2014 and the same DB reside on both computers involved with the test:
My laptop is a 3 year old i7 computer with 8GB of RAM.  It's fine but one would no longer consider it a "speed demon" compared to what's available today.  The query consistently took 30 - 33 seconds.
My client's server has an Intel Xeon 5670 Processor and 12GB of RAM.  That seems like pretty good specs.  However, the query consistently took between 120 - 135 seconds to complete ... about 4 times what my laptop did!
I was very surprised by how slow the server was.  Considering that it's also set to host IIS to run my web app, this is a major concern for me.   
If you were in my shoes, what would be the top 3 - 5 things you'd recommend looking at on the server and/or SQL Server to try to boost its performance?
Robert

What else runs on the server besides IIS and SQL ? Is it used for other things except the database and IIS ?
Is IIS causing a lot of I/O or CPU usage ?
Is there a max limit set for memory usage on SQL Server ? There SHOULD be and since you're using IIS too you need to keep more memory free for that too.
How is the memory pressure (check PLE counter) and post results.
SELECT [cntr_value] FROM sys.dm_os_performance_counters WHERE [object_name] LIKE '%Buffer Manager%' AND [counter_name] = 'Page life expectancy'
Check the error log and the event viewer maybe something bad there.
Check the indexes for fragmenation, see if the statistics are up to date (and enable trace flag 2371 if you have large tables > 1 million rows)
Is there an antivirus present on the server ? Do you have SQL processes/services/directories as exceptions ?
There are lot of unknowns, you should run at least profiler and post results to see what goes on while you're having slow responses.
"If there's nothing wrong with me, maybe there's something wrong with the universe!"

Similar Messages

  • Extract the data from SQL Server and Import into Oracle

    Hi,
    I would like to run a daily job that will export the table data from SQL server table (it will be only one or two table) and Import back into Oracle table (it might one or two table tables).
    Could you please guide me that how can i do this using either sql server or oracle?
    We have oracle 9.2 and sql server 2005.
    Normally i do from flat file which is generated by source destination nand i dump into oracle using sql*loader but this time I have to directly extract/export the data from MS Sql server and load into Oracle table, mostly it will reload so i might doing any massaging data during the load.
    If you show me the detail approach, it will be really appreciated.
    I have access to Sql server but i don't how to use sql server to do this or using oracle as a daily job even becuase have to schedule the job for this as it will be a daily job.
    Thanks,
    poratips

    Unless you can find an open source ODBC driver for SQL Server that runs on Solaris (and I wouldn't be overly hopeful there) Heterogeneous Services would require that you license something-- a third party ODBC driver, a new Oracle instance, or an Oracle Transparent Gateway.
    As I stated below, you could certainly use SQL Server's ETL tool, DTS. Oracle's ETL tools would require additional licensing since you're just on 9.2. You could also write a small application (Java or otherwise) that connected to both databases and transferred the data. If you're particularly enterprising, you could load the SQL Server Type 4 JDBC driver into Oracle's JVM and write a Java stored procedure that connected to the SQL Server database via JDBC, but that's a pretty convoluted approach.
    Justin

  • Improving CLR performance in SQL Server (redux)

    I have been spending a lot of time trying to eek out the maximum performance out of a C# CLR UDF. I have already set IsDeterministic and IsPrecise to true, as well as SystemDataAccessKind.None and DataAccessKind.None.
    I am now experimenting with the overhead of transferring to CLR.  I created a simple CLR UDF that just returns the input value, e.g.,
    [Microsoft.SqlServer.Server.SqlFunction(IsDeterministic=true, IsPrecise=true)]
    public static SqlString MyUDF(SqlString data)
    return data;
    Defined as:
    CREATE FUNCTION dbo.MyUDF(@data nvarchar(4000)) RETURNS nvarchar(4000) WITH EXECUTE AS CALLER
    AS EXTERNAL NAME [MyAssembly].[UserDefinedFunctions].[MyUDF];
    I then use the UDF in a View on the Primary Key (nvarchar) of a table with about 6M rows.
    I know there is a small overhead going through a View versus a Table. However, when I query through the table, it is about 2000% faster than querying through the View with the CLR UDF.  E.g., 3 seconds for the table and 60 seconds for the view! I checked
    the Query Plans for each and they are both using Parallelization.
    I have to assume that all the overhead is in the transition to CLR.  Is that much overhead to be expected?  Is there any way to improve that?
    Incidentally, this is a followup to this question:
    http://stackoverflow.com/questions/24722708/sql-server-clr-udf-parallelism-redux

    Assuming that a way is found to reduce this apparent overhead, what is the intended operation within the function? I ask because the advantages of SqlChars over SqlString might be moot if you will need to operate on the full string all
    at once as opposed to reading it as a stream of characters.
    Also, with regards to why the CLR UDF is so much faster than the T-SQL version, some amount of it certainly could be the ability to participate in a Parallel plan, but also a change was made in SQL Server 2012 that improved performance of deterministic CLR
    functions:
    Behavior Changes to Database Engine Features in SQL Server 2012
          Constant Folding for CLR User-Defined Functions and Methods
          In SQL Server 2012, the following user-defined CLR objects are now foldable:
    Deterministic scalar-valued CLR user-defined functions.
    Deterministic methods of CLR user-defined types.
          This improvement seeks to enhance performance when these functions or methods are called more than once with the same arguments.
    Also, 60 seconds down to 3 seconds is a 95% improvement, not 2000%.  Or you could say that the operation is 20x faster without the UDF.
    Now, outside of that, I recall seeing in another forum that someone was converting their string to VARBINARY using SqlBinary / SqlBytes and then returning VARBINARY and converting it back in T-SQL. Might be worth a test.

  • Performing an installation of jboss with sql server and doing the manual deployment

    hi,
    I've been trying to install policy server using jboss and sql server 2000. I followed all the steps mentioned in the install and config.pdf file.
    my question is if you have tried to perform this installation and did it successful?
    please if you did this, contact me, because in a general way, I want to know how you did.
    thanks,

    hi,
    I Got this error msg when i install ps using jboss and ms sql 2000:
    09:57:15,984 ERROR [DLQHandler] Initialization failed DLQHandler
    javax.jms.JMSException: Error creating the dlq connection: XAConnectionFactory
    at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:17
    1)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBean
    Support.java:237)
    at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:
    164)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContaine
    rInvoker.java:542)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContain
    erInvoker.java:764)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.o
    nException(JMSContainerInvoker.java:1267)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker$1.run(JMSContainerInvok
    er.java:776)
    can anybody tell me what went wrong ?
    thanks

  • Why the non-cluster SQL Server appeared in the cluster nodes list

    1, I install the node rs6 standalone, Why it appeared in the cluster node list by inquiry the dmv?
    2, how to removed the rs6 from the cluster node list ?
    by "set -clusterownernode -resource "XXXASQL" -owners NODE1,NODE2"?
    But how to find the resource  name? I tried to use window cluster name, SQL cluster name, and SQL role name , All of them say failed to get the cluster object.
     3,how to set the owers to {}, I try below, but failed.

    IMHO, sys.dm_os_cluster_nodes  DMV is associated with the SQL Server
    Operating System (SQLOS), sys.dm_os_cluster_nodes returns one row for each node in the failover cluster configuration.
    As you are running standalone instance on cluster I am assuming this information is being picked from
    OS and not from RS6 SQL instance.
    As you have confirmed Is_cluster is false and if you don’t see RS6 instance in failover cluster manager I don’t think anything damaged here. Everything looking as expected, dont change owner node as its standalone instance.

  • Executing Procedure in SQL SERVER and Storing the results in Oracle 10g

    Hello,
    I am trying execute SQL SERVER procedure from Oracle 10g and store the results in a oracle table. When I tried executing the procedure i am getting errors.
    I am using Oracle Heteroeneous Services.
    Steps I followed.
    1. Created ODBC DSN on Oracle Server connecting to SQL SERVER database.
    2. Created Listner entry and TNSNAMES entries.
    3. Created Database link and able to select the data from the SQL SERVER tables.
    Here is the code i tried to execute the procedure.
    BEGIN
    "META"."extract"@abc;
    END;
    "META"."extract"@abc;
    ERROR at line 2:
    ORA-06550: line 2, column 1:
    PLS-00201: identifier 'META.extract@ABC' must be declared
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    Please help me.
    Thank You,
    Seshadri Thope

    Hi thopevs,
    Can you please tell me the right syntax of calling procedures(on sql server) from oracle?
    I am getting following error:
    SQL> execute "GetdateSys"@oratosql;
    begin "GetdateSys"@oratosql; end;
    ORA-06550: line 2, column 7:
    PLS-00201: identifier 'GetdateSys@ORATOSQL' must be declared
    ORA-06550: line 2, column 7:
    PL/SQL: Statement ignored
    SQL>
    Your help will be highly appreciated.
    Thanks & Regards,
    M.U.N.A

  • How to Read the Image in SQL server

    I want to read the image from SQL server using labview.In our project languages used are JAVA and Labview
    Through java we acquiring the image and write in to SQL Server.
    Through Labview I want to read the image form SQL server and i will do some image processing for my application.
    My problem when I seen the database the images shown like hex decimal value.
    I want to convert the hexadecimal value to image or any other functions is there to directly read the image from SQL server.
    Can anybody help me....

    two options:
    1. save the image data itself (as a blob)
    2. save the image in a file system and save the file name in the DB

  • How to delete the Folder from sql server 2008

    Hi all,
    I was trying to delete the folder from sql server 2008 with the below script
    DECLARE @path VARCHAR(256) -- path for backup files
    DECLARE @cmd VARCHAR(8000)
    DECLARE @folderName VARCHAR(256) -- filename for backup
    SET @folderName = + (CONVERT(varchar(10), GETDATE()-7, 112))  -- 7 days back date folder name
    SET @path = 'I:\Backup_Test\' + @folderName -- Folder path
    SET @cmd = 'del ' + @path -- Delete
    EXEC master..xp_cmdshell @cmd
    --Print @cmd
    This is not working it was asking the Confirmation (I:\Backup_Test\20100629\*, Are you sure (Y/N)? ) what will i do to the delete the folder.
    Thanks,
    Prasad R.

    I would notice   you that T-SQL does not play well to do things like that. Do not you want using .net language to delete folders?
    Old method is
    declare @HR int, @CFOLDER varchar(255),@FSO int
        set @CFOLDER='D:\folder\'
        EXEC @HR = sp_OACreate 'Scripting.FileSystemObject', @FSO OUT
        EXEC @HR = sp_OAMethod @FSO, null, 'DeleteFolder', @CFOLDER 
    Now regarding to your second question please examine xp_fileexist  system stored procedure
    CREATE FUNCTION dbo.fn_file_exists(@filename VARCHAR(300))
      RETURNS INT
    AS
    BEGIN
      DECLARE @file_exists AS INT
      EXEC master..xp_fileexist @filename, @file_exists OUTPUT
      RETURN @file_exists
    END
    GO
    -- test
    SELECT dbo.fn_file_exists('c:\a.txt')
    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/

  • How can I architect my data layer to yield query result pages to the application as SQL Server prepares them?

    I tried to make the question as explicit as possible.
    Refer to Sql Server Management Studio's Results view.  Depending upon the structure of the execution plan, the Results pane may begin displaying results while the query is still executing.  Can someone point me in a direction for architecting a
    data layer (I am tech and framework agnostic for this task. Any solution will suffice) that will begin receiving pages of the set before SQL Server has completed the entire query?
    The call from the data layer to SQL Server will obviously have to be asynchronous, but is there any additional ceremony that I need to be aware of when issuing OPTION (FAST x) to the query optimizer?

    Thanks for the reply. (I actually meant to put this in the SQL Data Access forum, not the T-SQL forum)
    "Generally the last step is ORDER BY in a
    query, so nothing can start before that executes."
    I would imagine you cannot ORDER BY and yield results as they are fetched because of the execution plan that would be generated.  For the purposes of this post, please assume that sorting will be done purely client side
    "Can you post your query?"
     For purposes of discussion, let's assume that the query is
    select *
    from information_schema.columns
    and also assume that you have "lots" of columns to display.
    This was an exploratory question to see what would be necessary to replicate the behavior of Management Studio's Query Result view in a custom application. 
    I would imagine that there's going to be a lot of analysis of the execution plans that get generated in order for the OPTION (FAST x) optimizer hint to do any good, but apart from general tuning concerns that would allow SQL SERVER to yield a page of data
    "fast", I was wondering if there was anything else required of the calling client to force it to yield return its first page.
    After thinking about this (and phrasing it the way I did in the last sentence) perhaps this is the incorrect forum for this question.  I imagine that my concerns are better addressed in forums dedicated to the technology of the calling client (which
    would be a .NET assembly)
    Be that as it may, if there is any ceremony that SQL Server imposes on clients in order to yield return, I would expect that my question would be in the scope of SQL Server discussions (even though I intended this to be in a different SQL Server forum)

  • How to improve spreadsheet speed when single-threaded VBA is the bottleneck.

    My brother works with massive Excel spreadsheets and needs to speed them up. Gigabytes in size and often with a million rows and many sheets within the workbook. He's already refined the sheets to take advantage of Excel's multi-thread recalculation and
    seen significant improvements, but he's hit a stumbling block. He uses extensive VBA code to aid clarity, but the VB engine is single-threaded, and these relatively simple functions can be called millions of times. Some functions are trivial (e.g. conversion
    functions) and just for clarity and easily unwound (at the expense of clarity), some could be unwound but that would make the spreadsheets much more complex, and others could not be unwound. 
    He's aware of http://www.analystcave.com/excel-vba-multithreading-tool/ and similar tools but they don't help as the granularity is insufficiently fine. 
    So what can he do? A search shows requests for multi-threaded VBA going back over a decade.
    qts

    Hi,
    >> The VB engine is single-threaded, and these relatively simple functions can be called millions of times.
    The Office Object Model is
    Single-Threaded Apartments, if the performance bottleneck is the Excel Object Model operation, the multiple-thread will not improve the performance significantly.
    >> How to improve spreadsheet speed when single-threaded VBA is the bottleneck.
    The performance optimization should be based on the business. Since I’m not familiar with your business, so I can only give you some general suggestions from the technical perspective. According to your description, the size of the spreadsheet had reached
    Gigabytes and data volume is about 1 million rows. If so, I will suggest you storing the data to SQL Server and then use the analysis tools (e.g. Power Pivot).
    Create a memory-efficient Data Model using Excel 2013
    and the Power Pivot add-in
    As
    ryguy72 suggested, you can also leverage some other third party data processing tool
    according to your business requirement.
    Regards,
    Jeffrey
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Copy the data from Sql Server to edirectory using java

    Hi ,
    I am new to e directory.I don't know how it works.Can some one assist
    me on this ,I have to extract data from SQL Server and update these
    data in edirectory.This is needs to be done using java.
    If any one can provide me the sample code or please suggest how to
    proceed .
    Thanks in advance
    dukewarm
    dukewarm's Profile: http://forums.novell.com/member.php?userid=53430
    View this thread: http://forums.novell.com/showthread.php?t=373051

    dukewarm;1792481 Wrote:
    > Hi ,
    >
    > I am new to e directory.I don't know how it works.Can some one assist
    > me on this ,I have to extract data from SQL Server and update these
    > data in edirectory.This is needs to be done using java.
    >
    > If any one can provide me the sample code or please suggest how to
    > proceed .
    >
    > Thanks in advance
    Read the values from SQL server and use LDAP to update the data in
    eDirectory.
    Thomas
    thsundel
    thsundel's Profile: http://forums.novell.com/member.php?userid=128
    View this thread: http://forums.novell.com/showthread.php?t=373051

  • How to save image files into SQL Server?

    Hello, All:
    Does anyone know how to save image files into SQL Server? Does the file type have to be changed first?? Please help me! Thank you!

    You need a BLOB field (usually)... Then you can check this tutorial out:
    http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/exercises/BLOBPut/
    There are other exercises on that site, including one on reading the images back.

  • Connecting to SQL Server and MYSQL from a Java stored procedure

    hope someone can help with this. i'm trying to connect to different databases (My SQL, SQL Server) from a java stored procedure. when invoking from within an oracle 9i database, i get the java exception error -
    "Cannot connect to MySQL server on 135.177.196.75:3306. Is there a MySQL server running on the machine/port you are trying to connect to?java.security.AccessControlException)".
    this store procedure works fine when invoked from outside of oracle. any replies would be greatly appreciated. thanks!

    the correct drivers have been loaded. it works when called from outside of oracle. only when invoking from within oracle do we get the error message "Cannot connect to MySQL server on 135.177.196.75:3306. Is there a MySQL server running on the machine/port you are trying to connect to?(java.security.AccessControlException)". it sounds like a permissions/security/configuration issue - oracle is not allowing access to the machine/port for the MySQL or SQL Server database. appreciate the responses so far.

  • SQL Server and Oracle

    is there a SQL server tool or database utility that allows to automatically synchronize data between a table in SQL server and a table(same structure) residing in Oracle on a different server...
    Ashish

    SQL Server has DTS for this sort of thing. Oracle has Heterogenous Services.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to improve the updating a sql server table with another table in Oracle

    Hi there.
    I am trying to do the next updating in SSIS
    UPDATE S
    SET
    S.COLUMN_A = OT.COLUMN_A,
    S.COLUMN_B = OT.COLUMN_B
    FROM 
    SQLT1 S INNER JOIN ORACLET1  OT ON
    S. COLUMN_C = OT.COLUMN_C
    This is what I am doing:
    I am taking the Oracle data with the ODBC Source like this.
    Select column_A, column_B, column_C
    from OracleT1
    The thing is, the Oracle table has millions of registers and this updating is taking a lot. But I am not sure if it is maybe because of the design of the update query.
    I wonder is if there is another way to design this query or improve the performance of this task.
    Thanks a lot.

    Yes
    Use a OLEDB destination instead and save the records to a staging table
    Then use a subsequent Execute sql task and do the set based update in it as below
    UPDATE t
    SET COLUMN_A = s.COLUMN_A,
    COLUMN_B = s.COLUMN_B
    FROM SQLT1 t
    INNER JOIN stagingTable s
    ON s.COLUMN_C = t.COLUMN_C
    This would be much faster as its set based
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

Maybe you are looking for

  • Java7 and Java6 will not work opening pogo games on firefox, but works perfectly for IE, what can I do to fix this issue?

    Java will not work on the computer all of a sudden. Now when I go to open a Pogo game room up i get a Mozilla red lego piece in the corner saying "Some plug ins have been De-activated for your safety, in the box will be "Java (TM) platform SE 6 U". I

  • Error -70233 with SoftMotion

    Hello everyone, I'm actually working on a CompacRio 9081 with a NI-9501 module. I want to use SoftMotion to control a little step motor. The problem is, I get an error the first time I launch the vi to control the Step Motor. The error is right after

  • Euro symbol is driving me crazy!!

    My architecture is: - Oracle 8i 8.1.7 DBMS under Linux on server "db" - Oracle 9i application server under Linux on server "web" I've got a jsp page which calls a java class to query the db, get the result as xml string and transform it into HTML by

  • Slow browsing after upgrading to OS 6

    I'm running 6.0.0.448 on a 9780 with corporate BES and noticed that browsing is extremely slow. Specifically, when one first navigates to a site or enters a URL, there is a 10 second delay before the site loads. Once the site starts loading, it loads

  • Some kind of glue coming from the LCD-monitor

    My husband gave me a BB pearl for Christmas last year (08)-.but suddenly, a couple of weeks ago (maybe months), I started to get some kind of glue from the "monitor"- I called T-Mobile right away, and they said that as we did not pay for the insuranc