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.

Similar Messages

  • 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!"

  • 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

  • CLR triggers and SQL Server CE

    I have an SQL Server 2012 database where a table should fire a trigger which populates an SQL Server CE 4.0 table.
    Developing the trigger was no problem. The problem I'm facing is the System.Data.SqlServerCe.dll registration in my SQL Server database. I'm getting the following error:
    Warning: The SQL Server client assembly 'system.data.sqlserverce, version=4.0.0.0, culture=neutral, publickeytoken=89845dcd8080cc91, processorarchitecture=msil.' you are registering is not fully tested in SQL Server hosted environment.
    Msg 6218, Level 16, State 2, Line 1
    CREATE ASSEMBLY for assembly 'System.Data.SqlServerCe' failed because assembly 'System.Data.SqlServerCe' failed verification. Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database. CLR Verifier error messages if any will follow this message
    [ : System.Data.SqlServerCe.SqlCeCommand::ExecuteCommandText][mdToken=0x6000115][offset 0x00000033][trovato address of value 'System.Data.SqlServerCe.MEDBBINDING'][previsto address of Native Int] Tipo non previsto nello stack.
    [ : System.Data.SqlServerCe.SqlCeCommand::ExecuteCommandText][mdToken=0x6000115][offset 0x00000035][trovato address of Native Int] Previsto tipo numerico nello stack.
    [ : System.Data.SqlServerCe.SqlCeCommand::ExecuteCommandText][mdToken=0x6000115][offset 0x00000028][trovato Native Int][previsto address of Native Int] Tipo non previsto nello stack.
    [ : System.Data.SqlServerCe.SqlCeCommand::OpenCursor][mdToken=0x6000118][offset 0x00000106][trovato Native Int][previsto address of Int32] Tipo non previsto nello stack.
    [ : System.Data.SqlServerCe.SqlCeCommand::OpenCursor][mdToken=0x6000118][offset 0x000000DA][trovato unmanaged pointer][previsto unmanaged pointer] Tipo non previsto nello stack.
    [ : System.Data.SqlServerCe.SqlCeCommand::OpenCursor][mdToken=0x6000118][offset 0x000000E3][trovato address of Int32] Previsto tipo numerico nello stack.
    [ : System.Data.SqlServerCe.SqlCeCommand::OpenCursor][mdToken=0x6000118][offset 0x000000C6][trovato Native Int][previsto address of Int32] Tipo non previsto nello stack.
    [ : System.Data.SqlServerCe.SqlCeCommand::CompileQueryPlan][mdToken=0x6000120][offset 0x000000E4][trovato Native Int][previsto address of Native Int] Tipo non previsto nello stack.
    [ : System.Data.SqlServerCe.SqlCeCommand::CompileQueryPlan][mdToken=0x6000120][offset 0x00000075][trovato address of value 'System.Data.SqlServerCe.MEDBBINDING'][previsto address of Native Int] Tipo non previsto nello stack.
    [ : System.Data.SqlServerCe.SqlCeCommand::CompileQueryPlan][mdToken=0x6...
    Is it possible to have such a trigger? Or is there no way at all?
    Thank you in advance, regards
    pg

    System.Data.SqlServerCe.dll is not on the SQLCLR supported assemblies list. You can try registering that assembly (and your caller assembly) as PERMISSION_SET = UNSAFE but, even if this works now, there's no guarantees about it being supported
    in future.
    Hope this helps, Bob
     

  • Optimizing tempdb performance in SQL Server 2012

    SQL Server 2008 R2 BOL contains a topic on optimizing tempdb: SQL Server 2008 R2 Books Online > Database Engine > Development > Designing and Implementing Structured Storage > Databases > Optimizing Databases > Optimizing tempdb Performance.
    I have been unable to locate a comparable topic in BOL for SQL Server 2012.  Is this type of performance tuning for tempdb no longer necessary in SQL Server 2012?

    Is this type of performance tuning for tempdb no longer necessary in SQL Server 2012?
    That's incorrect. Looks like topic is missing in SQL 2012 BOL. I will alert the author and report back if needed. Meantime, you can follow the same for 2012 as well.
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • Using CLR Integration in SQL Server 2005

    I have several CLR SQLProcedures in my SQL Database for performing performing complex selects with regex etc.   These work exceptionally well form with Visual Strudio for retrieving a dataset. However from within Crystal Reports I can not see these stored procedures, so cannot use the to report on, which was the whole idea of creating them.
    Also, if I create a standard sql stored procedure, but include a CLR SQLFunction, it also fails in Crystal Reports.
    Considering CLR Intergration ha sbeen around since 2004/5, I would have expected CR 2008 to ba able to make use of them, but I can find no way to make them work.
    I hope some one can assist me in this quest.

    Please post this query to the Crystal Reports Design forum:
    SAP Crystal Reports
    That forum is monitored by qualified technicians and you will get a faster response there. Also, all BOE queries remain in one place and thus can be easily searched in one place.
    Thank you for your understanding,
    Ludek

  • Improving retrieval performance of essbase server in unix environment

    HI,
    Our production environment is unix system. can any one suggest settings which impact the retrieval performance and how to do these settings in unix environment.

    Naveen,
    For retrieval perfomance, Increase the retreival buffer size.
    Default is 10 KB for 32 bit platforms and 20 KB for 64 bit.
    make it 100 KB.
    2. if the data block size is large ,and you are retriving cells across several blocks
    set VLBREPORT true in the essbase.cfg configuration file
    NOTE: this will increase the retrival process but , its applicable to the outlines which does not include dynamic calcs.
    3. If the format of your reoport is of not much importance. group dense dimension in colums and groping sparse in rows ,this would be faster.
    4. An applicaion/database does has a limt on its memory consumption.
    So, RAM is the key for the speed.
    Best part is that ,as you have UNIX operating system ,addressabe memory in your case is 3.9GB(which is very good) unlike 2 GB in case of windows.This is per application.
    Sandeep Reddy Enti
    HCC

  • Increase Performance and ROI for SQL Server Environments

    May 2015
    Explore
    The Buzz from Microsoft Ignite 2015
    NetApp was in full force at the recent Microsoft Ignite show in Chicago, talking about solutions for hybrid cloud, and our proven solutions for Microsoft SQL Server and other Microsoft applications.
    Hot topics at the NetApp booth included:
    OnCommand® Shift. A revolutionary technology that lets you move virtual machines back and forth between VMware and Hyper-V environments in minutes.
    Azure Site Recovery to NetApp Private Storage. Replicate on-premises SAN-based applications to NPS for disaster recovery in the Azure cloud.
    These tools give you greater flexibility for managing and protecting important business applications.
    Chris Lemmons
    Director, EIS Technical Marketing, NetApp
    If your organization runs databases such as Microsoft SQL Server and Oracle DB, you probably know that these vendors primarily license their products on a "per-core" basis. Microsoft recently switched to "per-core" rather than "per-socket" licensing for SQL Server 2012 and 2014. This change can have a big impact on the total cost of operating a database, especially as core counts on new servers continue to climb. It turns out that the right storage infrastructure can drive down database costs, increase productivity, and put your infrastructure back in balance.
    In many customer environments, NetApp has noticed that server CPU utilization is low—often on the order of just 20%. This is usually the result of I/O bottlenecks. Server cores have to sit and wait for I/O from hard disk drives (HDDs). We've been closely studying the impact of all-flash storage on SQL Server environments that use HDD-based storage systems. NetApp® All Flash FAS platform delivers world-class performance for SQL Server plus the storage efficiency, application integration, nondisruptive operations, and data protection of clustered Data ONTAP®, making it ideal for SQL Server environments.
    Tests show that All Flash FAS can drive up IOPS and database server CPU utilization by as much as 4x. And with a 95% reduction in latency, you can achieve this level of performance with half as many servers. This reduces the number of servers you need and the number of cores you have to license, driving down costs by 50% or more and paying back your investment in flash in as little as six months.
    Figure 1) NetApp All Flash FAS increases CPU utilization on your SQL Server database servers, lowering costs.
    Source: NetApp, 2015
    Whether you're running one of the newer versions of SQL Server or facing an upgrade of an earlier version, you can't afford not to take a second look at your storage environment.
    End of Support for Microsoft SQL Server 2005 is Rapidly Approaching
    Microsoft has set the end of extended support for SQL Server 2005 for April 2016—less than a year away. With support for Microsoft Windows 2003 ending in July 2015, time may already be running short.
    If you're running Windows Server 2003, new server hardware is almost certainly needed when you upgrade SQL Server. Evaluate your server and storage options now to get costs under control.
    Test Methodology
    To test the impact of flash on SQL Server performance, we replaced a legacy HDD-based storage system with an All Flash FAS AFF8080 EX. The legacy system was configured with almost 150 HDDs, a typical configuration for HDD storage supporting SQL Server. The AFF8080 EX used just 48 SSDs.
    Table 1) Components used in testing.
    Test Configuration Components
    Details
    SQL Server 2014 servers
    Fujitsu RX300
    Server operating system
    Microsoft Windows 2012 R2 Standard Edition
    SQL Server database version
    Microsoft SQL Server 2014 Enterprise Edition
    Processors per server
    2 6-core Xeon E5-2630 at 2.30 GHz
    Fibre channel network
    8Gb FC with multipathing
    Storage controller
    AFF8080 EX
    Data ONTAP version
    Clustered Data ONTAP® 8.3.1
    Drive number and type
    48 SSD
    Source: NetApp, 2015
    The test configuration consisted of 10 database servers connected through fibre channel to both the legacy storage system and the AFF8080 EX. Each of the 10 servers ran SQL Server 2014 Enterprise Edition.
    The publicly available HammerDB workload generator was used to drive an OLTP-like workload simultaneously from each of the 10 database servers to storage. We first directed the workload to the legacy storage array to establish a baseline, increasing the load to the point where read latency consistently exceeded 20ms.
    That workload was then directed at the AFF8080 EX. The change in storage resulted in an overall 20x reduction in read latency, a greater than 4x improvement in IOPS, and a greater than 4x improvement in database server CPU utilization.
    Figure 2) NetApp All Flash FAS increases IOPS and server CPU utilization and lowers latency.
    Source: NetApp, 2015
    In other words, the database servers are able to process four times as many IOPS with dramatically lower latency. CPU utilization goes up accordingly because the servers are processing 4x the work per unit time.
    The All Flash FAS system still had additional headroom under this load.
    Calculating the Savings
    Let's look at what this performance improvement means for the total cost of running SQL Server 2014 over a 3-year period. To do the analysis we used NetApp Realize, a storage modeling and financial analysis tool designed to help quantify the value of NetApp solutions and products. NetApp sales teams and partners use this tool to assist with return on investment (ROI) calculations.
    The calculation includes the cost of the AFF8080 EX, eliminates the costs associated with the existing storage system, and cuts the total number of database servers from 10 to five. This reduces SQL Server licensing costs by 50%. The same workload was run with five servers and achieved the same results. ROI analysis is summarized in Table 2.
    Table 2) ROI from replacing an HDD-based storage system with All Flash FAS, thereby cutting server and licensing costs in half.
    Value
    Analysis Results
    ROI
    65%
    Net present value (NPV)
    $950,000
    Payback period
    six months
    Total cost reduction
    More than $1 million saved over a 3-year analysis period compared to the legacy storage system
    Savings on power, space, and administration
    $40,000
    Additional savings due to nondisruptive operations benefits (not included in ROI)
    $90,000
    Source: NetApp, 2015
    The takeaway here is that you can replace your existing storage with All Flash FAS and get a big performance bump while substantially reducing your costs, with the majority of the savings derived from the reduction in SQL Server licensing costs.
    Replace your existing storage with All Flash FAS and get a big performance bump while substantially reducing your costs.
    Maximum SQL Server 2014 Performance
    In addition to the ROI analysis, we also measured the maximum performance of the AFF8080 EX with SQL Server 2014. A load-generation tool was used to simulate an industry-standard TPC-E OLTP workload against an SQL Server 2014 test configuration.
    A two-node AFF8080 EX achieved a maximum throughput of 322K IOPS at just over 1ms latency. For all points other than the maximum load point, latency was consistently under 1ms and remained under 0.8ms up to 180K IOPS.
    Data Reduction and Storage Efficiency
    In addition to performance testing, we looked at the overall storage efficiency savings of our SQL Server database implementation. The degree of compression that can be achieved is dependent on the actual data that is written and stored in the database. For this environment, inline compression was effective. Deduplication, as is often the case in database environments, provided little additional storage savings and was not enabled.
    For the test data used in the maximum performance test, we measured a compression ratio of 1.5:1. We also tested inline compression on a production SQL Server 2014 data set to further validate these results and saw a 1.8:1 compression ratio.
    Space-efficient NetApp Snapshot® copies provide additional storage efficiency benefits for database environments. Unlike snapshot methods that use copy-on-write, there is no performance penalty; unlike full mirror copies, NetApp Snapshot copies use storage space sparingly. Snapshot copies only consume a small amount of storage space for metadata and additional incremental space is consumed as block-level changes occur. In a typical real-world SQL Server deployment on NetApp storage, database volume Snapshot copies are made every two hours.
    First introduced more than 10 years ago, NetApp FlexClone® technology also plays an important role in SQL Server environments. Clones are fully writable, and, similar to Snapshot copies, only consume incremental storage capacity. With FlexClone, you can create as many copies of production data as you need for development and test, reporting, and so on. Cloning is a great way to support the development and test work needed when upgrading from an earlier version of SQL Server. You'll sometimes see these types of capabilities referred to as "copy data management."
    A Better Way to Run Enterprise Applications
    The performance benefits that all-flash storage can deliver for database environments are significant: more IOPS, lower latency, and an end to near-constant performance tuning.
    If you think the performance acceleration that comes with all-flash storage is cost prohibitive, think again. All Flash FAS doesn't just deliver a performance boost, it changes the economics of your operations, paying for itself with thousands in savings on licensing and server costs. In terms of dollars per IOPS, All Flash FAS is extremely economical relative to HDD.
    And, because All Flash FAS runs NetApp clustered Data ONTAP, it delivers the most complete environment to support SQL Server and all your enterprise applications with capabilities that include comprehensive storage efficiency, integrated data protection, and deep integration for your applications.
    For complete details on this testing look for NetApp TR-4303, which will be available in a few weeks. Stay tuned to Tech OnTap for more information as NetApp continues to run benchmarks with important server workloads including Oracle DB and server virtualization.
    Learn more about NetApp solutions for SQL Server and NetApp All-flash solutions.
    Quick Links
    Tech OnTap Community
    Archive
    PDF

    May 2015
    Explore
    The Buzz from Microsoft Ignite 2015
    NetApp was in full force at the recent Microsoft Ignite show in Chicago, talking about solutions for hybrid cloud, and our proven solutions for Microsoft SQL Server and other Microsoft applications.
    Hot topics at the NetApp booth included:
    OnCommand® Shift. A revolutionary technology that lets you move virtual machines back and forth between VMware and Hyper-V environments in minutes.
    Azure Site Recovery to NetApp Private Storage. Replicate on-premises SAN-based applications to NPS for disaster recovery in the Azure cloud.
    These tools give you greater flexibility for managing and protecting important business applications.
    Chris Lemmons
    Director, EIS Technical Marketing, NetApp
    If your organization runs databases such as Microsoft SQL Server and Oracle DB, you probably know that these vendors primarily license their products on a "per-core" basis. Microsoft recently switched to "per-core" rather than "per-socket" licensing for SQL Server 2012 and 2014. This change can have a big impact on the total cost of operating a database, especially as core counts on new servers continue to climb. It turns out that the right storage infrastructure can drive down database costs, increase productivity, and put your infrastructure back in balance.
    In many customer environments, NetApp has noticed that server CPU utilization is low—often on the order of just 20%. This is usually the result of I/O bottlenecks. Server cores have to sit and wait for I/O from hard disk drives (HDDs). We've been closely studying the impact of all-flash storage on SQL Server environments that use HDD-based storage systems. NetApp® All Flash FAS platform delivers world-class performance for SQL Server plus the storage efficiency, application integration, nondisruptive operations, and data protection of clustered Data ONTAP®, making it ideal for SQL Server environments.
    Tests show that All Flash FAS can drive up IOPS and database server CPU utilization by as much as 4x. And with a 95% reduction in latency, you can achieve this level of performance with half as many servers. This reduces the number of servers you need and the number of cores you have to license, driving down costs by 50% or more and paying back your investment in flash in as little as six months.
    Figure 1) NetApp All Flash FAS increases CPU utilization on your SQL Server database servers, lowering costs.
    Source: NetApp, 2015
    Whether you're running one of the newer versions of SQL Server or facing an upgrade of an earlier version, you can't afford not to take a second look at your storage environment.
    End of Support for Microsoft SQL Server 2005 is Rapidly Approaching
    Microsoft has set the end of extended support for SQL Server 2005 for April 2016—less than a year away. With support for Microsoft Windows 2003 ending in July 2015, time may already be running short.
    If you're running Windows Server 2003, new server hardware is almost certainly needed when you upgrade SQL Server. Evaluate your server and storage options now to get costs under control.
    Test Methodology
    To test the impact of flash on SQL Server performance, we replaced a legacy HDD-based storage system with an All Flash FAS AFF8080 EX. The legacy system was configured with almost 150 HDDs, a typical configuration for HDD storage supporting SQL Server. The AFF8080 EX used just 48 SSDs.
    Table 1) Components used in testing.
    Test Configuration Components
    Details
    SQL Server 2014 servers
    Fujitsu RX300
    Server operating system
    Microsoft Windows 2012 R2 Standard Edition
    SQL Server database version
    Microsoft SQL Server 2014 Enterprise Edition
    Processors per server
    2 6-core Xeon E5-2630 at 2.30 GHz
    Fibre channel network
    8Gb FC with multipathing
    Storage controller
    AFF8080 EX
    Data ONTAP version
    Clustered Data ONTAP® 8.3.1
    Drive number and type
    48 SSD
    Source: NetApp, 2015
    The test configuration consisted of 10 database servers connected through fibre channel to both the legacy storage system and the AFF8080 EX. Each of the 10 servers ran SQL Server 2014 Enterprise Edition.
    The publicly available HammerDB workload generator was used to drive an OLTP-like workload simultaneously from each of the 10 database servers to storage. We first directed the workload to the legacy storage array to establish a baseline, increasing the load to the point where read latency consistently exceeded 20ms.
    That workload was then directed at the AFF8080 EX. The change in storage resulted in an overall 20x reduction in read latency, a greater than 4x improvement in IOPS, and a greater than 4x improvement in database server CPU utilization.
    Figure 2) NetApp All Flash FAS increases IOPS and server CPU utilization and lowers latency.
    Source: NetApp, 2015
    In other words, the database servers are able to process four times as many IOPS with dramatically lower latency. CPU utilization goes up accordingly because the servers are processing 4x the work per unit time.
    The All Flash FAS system still had additional headroom under this load.
    Calculating the Savings
    Let's look at what this performance improvement means for the total cost of running SQL Server 2014 over a 3-year period. To do the analysis we used NetApp Realize, a storage modeling and financial analysis tool designed to help quantify the value of NetApp solutions and products. NetApp sales teams and partners use this tool to assist with return on investment (ROI) calculations.
    The calculation includes the cost of the AFF8080 EX, eliminates the costs associated with the existing storage system, and cuts the total number of database servers from 10 to five. This reduces SQL Server licensing costs by 50%. The same workload was run with five servers and achieved the same results. ROI analysis is summarized in Table 2.
    Table 2) ROI from replacing an HDD-based storage system with All Flash FAS, thereby cutting server and licensing costs in half.
    Value
    Analysis Results
    ROI
    65%
    Net present value (NPV)
    $950,000
    Payback period
    six months
    Total cost reduction
    More than $1 million saved over a 3-year analysis period compared to the legacy storage system
    Savings on power, space, and administration
    $40,000
    Additional savings due to nondisruptive operations benefits (not included in ROI)
    $90,000
    Source: NetApp, 2015
    The takeaway here is that you can replace your existing storage with All Flash FAS and get a big performance bump while substantially reducing your costs, with the majority of the savings derived from the reduction in SQL Server licensing costs.
    Replace your existing storage with All Flash FAS and get a big performance bump while substantially reducing your costs.
    Maximum SQL Server 2014 Performance
    In addition to the ROI analysis, we also measured the maximum performance of the AFF8080 EX with SQL Server 2014. A load-generation tool was used to simulate an industry-standard TPC-E OLTP workload against an SQL Server 2014 test configuration.
    A two-node AFF8080 EX achieved a maximum throughput of 322K IOPS at just over 1ms latency. For all points other than the maximum load point, latency was consistently under 1ms and remained under 0.8ms up to 180K IOPS.
    Data Reduction and Storage Efficiency
    In addition to performance testing, we looked at the overall storage efficiency savings of our SQL Server database implementation. The degree of compression that can be achieved is dependent on the actual data that is written and stored in the database. For this environment, inline compression was effective. Deduplication, as is often the case in database environments, provided little additional storage savings and was not enabled.
    For the test data used in the maximum performance test, we measured a compression ratio of 1.5:1. We also tested inline compression on a production SQL Server 2014 data set to further validate these results and saw a 1.8:1 compression ratio.
    Space-efficient NetApp Snapshot® copies provide additional storage efficiency benefits for database environments. Unlike snapshot methods that use copy-on-write, there is no performance penalty; unlike full mirror copies, NetApp Snapshot copies use storage space sparingly. Snapshot copies only consume a small amount of storage space for metadata and additional incremental space is consumed as block-level changes occur. In a typical real-world SQL Server deployment on NetApp storage, database volume Snapshot copies are made every two hours.
    First introduced more than 10 years ago, NetApp FlexClone® technology also plays an important role in SQL Server environments. Clones are fully writable, and, similar to Snapshot copies, only consume incremental storage capacity. With FlexClone, you can create as many copies of production data as you need for development and test, reporting, and so on. Cloning is a great way to support the development and test work needed when upgrading from an earlier version of SQL Server. You'll sometimes see these types of capabilities referred to as "copy data management."
    A Better Way to Run Enterprise Applications
    The performance benefits that all-flash storage can deliver for database environments are significant: more IOPS, lower latency, and an end to near-constant performance tuning.
    If you think the performance acceleration that comes with all-flash storage is cost prohibitive, think again. All Flash FAS doesn't just deliver a performance boost, it changes the economics of your operations, paying for itself with thousands in savings on licensing and server costs. In terms of dollars per IOPS, All Flash FAS is extremely economical relative to HDD.
    And, because All Flash FAS runs NetApp clustered Data ONTAP, it delivers the most complete environment to support SQL Server and all your enterprise applications with capabilities that include comprehensive storage efficiency, integrated data protection, and deep integration for your applications.
    For complete details on this testing look for NetApp TR-4303, which will be available in a few weeks. Stay tuned to Tech OnTap for more information as NetApp continues to run benchmarks with important server workloads including Oracle DB and server virtualization.
    Learn more about NetApp solutions for SQL Server and NetApp All-flash solutions.
    Quick Links
    Tech OnTap Community
    Archive
    PDF

  • SQL Server 2005 performance decreases with DB size while SQL Server 2012 is fine

    Hi,
    We have a C# windows service running that polls some files and inserts/updates some fields in database.
    The service was tested on a local dev machine with SQL Server 2012 running and performance was quite decent with any number of records. Later on the service was moved to a test stage environment where SQL Server 2005 is installed. At that point database
    was still empty and service was running just fine but later on, after some 500k records were written, performance problems came to light. After some more tests we've founds out that, basically, database operation performance in SQL Server 2005 decreases with
    a direct correlation with the database size. Here are some testing results:
    Run#
    1
    2
    3
    4
    5
    DB size (records)
    520k
    620k
    720k
    820k
    920k
    SQL Server 2005
    TotalRunTime
    25:25.1
    32:25.4
    38:27.3
    42:50.5
    43:51.8
    Get1
    00:18.3
    00:18.9
    00:20.1
    00:20.1
    00:19.3
    Get2
    01:13.4
    01:17.9
    01:21.0
    01:21.2
    01:17.5
    Get3
    01:19.5
    01:24.6
    01:28.4
    01:29.3
    01:24.8
    Count1
    00:19.9
    00:18.7
    00:17.9
    00:18.7
    00:19.1
    Count2
    00:44.5
    00:45.7
    00:45.9
    00:47.0
    00:46.0
    Count3
    00:21.7
    00:21.7
    00:21.7
    00:22.3
    00:22.3
    Count4
    00:23.6
    00:23.9
    00:23.9
    00:24.9
    00:24.5
    Process1
    03:10.6
    03:15.4
    03:14.7
    03:21.5
    03:19.6
    Process2
    17:08.7
    23:35.7
    28:53.8
    32:58.3
    34:46.9
    Count5
    00:02.3
    00:02.3
    00:02.3
    00:02.3
    00:02.1
    Count6
    00:01.6
    00:01.6
    00:01.6
    00:01.7
    00:01.7
    Count7
    00:01.9
    00:01.9
    00:01.7
    00:02.0
    00:02.0
    Process3
    00:02.0
    00:01.8
    00:01.8
    00:01.8
    00:01.8
    SQL Server 2012
    TotalRunTime
    12:51.6
    13:38.7
    13:20.4
    13:38.0
    12:38.8
    Get1
    00:21.6
    00:21.7
    00:20.7
    00:22.7
    00:21.4
    Get2
    01:38.3
    01:37.2
    01:31.6
    01:39.2
    01:37.3
    Get3
    01:41.7
    01:42.1
    01:35.9
    01:44.5
    01:41.7
    Count1
    00:20.3
    00:19.9
    00:19.9
    00:21.5
    00:17.3
    Count2
    01:04.5
    01:04.8
    01:05.3
    01:10.0
    01:01.0
    Count3
    00:24.5
    00:24.1
    00:23.7
    00:26.0
    00:21.7
    Count4
    00:26.3
    00:24.6
    00:25.1
    00:27.5
    00:23.7
    Process1
    03:52.3
    03:57.7
    03:59.4
    04:21.2
    03:41.4
    Process2
    03:05.4
    03:06.2
    02:53.2
    03:10.3
    03:06.5
    Count5
    00:02.8
    00:02.7
    00:02.6
    00:02.8
    00:02.7
    Count6
    00:02.3
    00:03.0
    00:02.8
    00:03.4
    00:02.4
    Count7
    00:02.5
    00:02.9
    00:02.8
    00:03.4
    00:02.5
    Process3
    00:21.7
    00:21.0
    00:20.4
    00:22.8
    00:21.5
    One more thing is that it's not Process2 table that constantly grows in size but is Process1 table, that gets almost 100k records each run.
    After that SQL Server 2005 has also been installed on a dev machine just to test things and we got exactly the same results. Both SQL Server 2005 and 2012 instances are installed using default settings with no changes at all. The same goes for databases
    created for the service.
    So the question is - why are there such huge differences between performance of SQL Server 2005 and 2012? Maybe there are some settings that are set by default in SQL Server 2012 database that need to be set manually in 2005?
    What else can I try to test? The main problem is that production SQL Server will be updated god-knows-when and we can't just wait for that.
    Any suggestions/advices are more than welcome.

    ...One more thing is that it's not Process2 table that constantly grows in size but is
    Process1 table, that gets almost 100k records each run....
    Hi,
    It is not clear to me what is that you are doing, but now we have a better understanding on ONE of your tables an it is obviously you will get worse result as the data become bigger. Actually your table look like a automatic build table by ORM like Entity
    Framework, and it's DDL probably do not much your needs. For example if your select query is using a filter on the other column that [setID] then you have no index and the server probably have to scan the entire table in order to find the records that you
    need.
    Forum is a suitable place to seek advice about a specific system (as I mentioned before we are not familiar with your system), and it is more suitable for general questions. For example the fact that you have no index except the index on the column [setID]
    can indicate a problem. Ultimately to optimize the system will need to investigate it more thoroughly (as it is no longer appropriate forum ... but we're not there yet). Another point is that now we can see that you are using [timestamp] column, an this
    implies that your are using this column as a filter for selecting the data. If so, then maybe a better DDL will be to use clustered index on this column and if needed a nonclustered index on the [setID] if it is needed at all...
    what is obviously is that next is to check if this DDL fit
    your specific needs (as i mentioned before).
    Next step is to understand what action do you do with this table. (1) what is your query which become slowly in a bigger data set. (2) Are you using ORM (object relational mapping, like Entity Framework
    code first), and if so then which one.
    [Personal Site] [Blog] [Facebook]

  • Which is better for performance Azure SQL Database or SQL Server in Azure VM?

    Hi,
    We are building an ASP.NET app that will be running on Microsoft Cloud which I think is the new name for Windows Azure. We're expecting this app to have many simultaneous users and want to make sure that we provide excellent performance to end users.
    Here are our main concerns/desires:
    Performance is paramount. Fast response times are very very important
    We want to have as little to do with platform maintenance as possible e.g. managing OS or SQL Server updates, etc.
    We are trying to use "out-of-the-box" standard features.
    With that said, which option would give us the best possible database performance: a SQL Server instance running in a VM on Azure or SQL Server Database as a fully managed service?
    Thanks, Sam

    hello,
    SQL Database using shared resources on the Microsft data centre. Microsoft balance the resource usage of SQL Database so that no one application continuously dominates any resource.You can try the 
    Premium Preview
    for Windows Azure SQL Database which offers better performance by guaranteeing a fixed amount of dedicated resources for a database.
    If you using SQL Server instance running in a VM, you control the operating system and database configuration. And the
    performance of the database depends on many factors such as the size of a virtual machine, and the configuration of the data disks.
    Reference:
    Choosing between SQL Server in Windows Azure VM & Windows Azure SQL Database
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here. 
    Fanny Liu
    TechNet Community Support

  • SCOM 2012: Report Viewer / SQL Server 2012 CLR??

    Hello,
    I am trying to install an Operations Console to a Management Server and it request
    1. Report Viewer
    Then I tried to install Report Viewer then it requests:
    Microsoft System CLR Types for SQL Server 2012
    These are ne for SCOM 2012?
    I check the MS in SCOM 2007 R2 there is no SQL module installed...
    Any clue?
    How to install this report viewer is it included in another product? Should I use SQL ?
    I don't have any SQL module on this management server
    Thanks,
    Dom
    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

    Hi,
    I hope this can help you:
    http://thoughtsonopsmgr.blogspot.dk/2013/10/upgrading-to-scom-2012-r2-rtm-report.html
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Importing from SQL Server - Performance

    Hello,
    I am developing an Access 2010 database with a SQL Server 2008 R2 backend. I would be interested in getting some feedback on which method of retrieving the results from SQL Server and displaying them in Excel would show the best performance. Assume the following
    options.
    1. Create a pass-through query in Access and execute the following VBA code;
    Set qdf = db.QueryDefs("qry_Passthrough")
    SQL = "SELECT * FROM qry_Passthrough WHERE ID = 1"
    Set rst = qdf.OpenRecordset(SQL, dbOpenSnapshot)
    2. Create a pass-through query in VBA code;
    Set qdf = db.CreateQueryDef("")
    qdf.SQL = "SELECT * FROM tbl_Data WHERE ID = 1"
    Set rst = qdf.OpenRecordset(dbOpenSnapshot)
    3. Create an inline table valued function (itvf_Data) and pass in the ID parameter;
    Set qdf = db.CreateQueryDef("")
    qdf.SQL = "SELECT * FROM dbo.itvf_Data (1)"
    Set rst = qdf.OpenRecordset(dbOpenSnapshot)
    4. Create a View in SQL Server and return the results;
    Set qdf = db.CreateQueryDef("")
    qdf.SQL = "SELECT * FROM vw_Data WHERE ID = 1"
    Set rst = qdf.OpenRecordset(dbOpenSnapshot)
    5. Create a linked View in Access to reference vw_Data;
    SQL = "SELECT * FROM dbo_vw_Data WHERE ID = 1"
    Set rst = qdf.OpenRecordset(SQL, dbOpenSnapshot)

    1.,2.: As long as it's a passthrough the creation of it does not influence the performance.
    3.: A TVF is a good development tool. As long as you call it only with parameters, it's imho okay. The problems begin when you need additional condtions. Adding them as WHERE clause may affect performance, cause SQL Server cannot optimize them well.
    4./5. Server-side views are clearly the best approach. Due to o9ptimization and plan caching by SQL Server.

  • Speed of SQL server web edition is slow then express edition

    Hello,
    I have query regarding performance difference between SQL server express edition and web edition.
    There two server with same configuration (8 GB Ram, 4 core, hard disk has about 90 GB free memory), both server has only SQL server not any other software or programs which affect the performance.
    Software version as below:
    Server1: Windows server 2012 R2 & Microsoft SQL Server 2014 - 12.0.2430.0 (X64) web edition
    Server2: Windows server 2008 R2 & Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000. 0 (X64) express edition
    I have restore one database backup on both servers (So on both server database with same records) and executed some queries on both the servers, Result bit surprising because express edition is always faster than web edition.
    Then I have do following things but still result is same:
    Rebuild indexes
    Make max memory allocation same
    Please provide me suggestion to improve speed of Microsoft SQL Server 2014 - 12.0.2430.0 (X64) web edition
    Thank in advance.

    So exactly the same plan for both. What does Profiler say? Same amount of I/O, CPU? If so, next step would be to eliminate the network and other paths out from the machine. If it is a SELECT, then you can add INTO into a temp table and see if you get the
    same performance. If so, you know the issue is with the data leaving your SQL Server ang getting to the client - those aspects. 
    Tibor Karaszi, SQL Server MVP |
    web | blog

  • The user id "sa" is getting locked frequently in SQL server 2008 R2

    Hi Team, 
    We have SQL server 2008 R2 machine and recently i'm getting issue with the user id "sa" as its getting locked out. I;m not sure with the reason caused with this. I need to login to the SQLserver with windows authentication and manually unlock
    the "sa" account and its happening frequently.
    Let me know how to fix this?
    Regards,
    Guru 

    Might be the SA account either using by any application team or any job have been configured to use it, since you are saying that its getting locked out then it someone or application or apps jobs performing with Mulitple incorrect login attempts with incorrect
    password try(since if check_expiration enabled it it can lockout based on the windows password policy, so you can check in the SQL errorlog when was the last login succeeded and from when the incorrect attempts tried & finally it gets locked out(so here
    you will have from which host it was trying)).
    So talk to the application team, did anyone recently changed the SA password or some one misusing or configured to any applications .
    If nothing works then perform the  SQL server side trace to track it or trigger can help
    Thanks, Rama Udaya.K (http://rama38udaya.wordpress.com) ---------------------------------------- Please remember to mark the replies as answers if they help and UN-mark them if they provide no help,Vote if they gives you information.

  • Moving from SQL server 2005 to SQL server 2008 ... for a MS/SQL newbie.

    Hello,
    I am in charge of moving an existing SAP NW BI (SPS20) from a MS SQL Server 2005 database on Windows Server 2003 (x864/64 bit) Platform to a MS SQL Server 2008 database/Windows Server 2008 Platform (x64/64 bit).
    The SID of the SAP system will remain the same.
    The thing is  that I have always worrked so far on Oracle/Unix environements, windows/MSSQL is an entire new world for me,
    so I am quite worried.
    I  have read many sap notes/installation guides/forum posts regarding this operation, I will describe here my understanding
    of the techinical operations that I will need to perfrom.
    Could you correct me if I am wrong, as well as give me your comments ?
    1/ I will need to perform an SQL server database copy within a homogeneous system copy.
    2/First ,I'll have to install on the target environnement the SQL server 2008 database. I'll have to install the SQL Server Database Software with SQL4SAP (no need to install the database server software manually, right ?). Afterwards, I'll install on the target environnent, SAP Netweaver 7.0 SR3 with a modified Instalaltion Master DVD.
    3/ On the source environement, I'll perfrom a database backup of the SQL Server 2005 system and restore the database on the target environement. since I choose to perfrom a restore of the database , there is no need to follow all the steps described in sap note 151603 :determine the file structure of the source database, create the directory structure for the target database, etc ...
    4/ Once the restoration is finished, I use SAPINST and finish the homogeneous copy :  >additional sofware->system copy>target system->central system --> Based on AS Abap --central installation
    Your comments are welcome.
    Thank you for your attention
    Best Regards.
    Raoul

    Hi Raoul,
    you also need a modified Kernel DVD for the installation on SQL 2008 (see SAP Note 1152240).
    And don't forget to install and patch the Visual Studio c++ Runtime (also described in that note).
    I also would recommend to restore the backup and then install SAP NW 7.0 SR3 and use the restored SQL 2008 database.
    So the basic steps are:
    1. Perform backup and restore to SQL 2008
    1.1 Install SQL 2008 with SQL4SAP
    1.2 Backup old database
    1.3. Restore backup on SQL 2008
    2. Install VC runtime on Win 2008
    3. Create modified Kernel DVD
    4. Create modified Master DVD
    5. Perform system copy target installaton with - additional sofware->system copy>target system--->central system --> Based on AS Abap --central installation and use the SQL 2008 database
    You could also use SQL Server 2008 R2 which was release last month.
    Please also check Note 1476928
    Best,
    Sebastian Dusch

Maybe you are looking for

  • How can I set up a mail alias in Mountain Lion Server?

    Hi, newbie to Mountain Lion Server here. I've set up mail for domain a.com and a virtual domain b.com User a receives mail just fine at [email protected] and [email protected], now I wanted to receive mail for [email protected] as an alias, which I u

  • Trouble with locked/read only files and folders

    After reinstalling OSX I have an external harddrive with locked files and folders. I´ve heard that it is possible to unlock all files and folders from Terminal (it will take hours to unlock manually). Anyone who knows a script that will set read and

  • Workflow Task

    Can anyone give me some idea regarding Workflow task and what is the use of this. Thanks

  • Localized Data Model Message Bundle

    When you use the Validations in the Entity Objects of a data model and you place text for the text, errors, etc...it creates a MsgBundle for that class. Then for other languages you can create additional message bundle (e.g. MsgBundle_it, for italian

  • Cover flow uses two different modes

    I haven't seen this problem in similar discussions: The cover flow on my Nano 8G starts by ordering by Artist, and then suddenly changes to ordering by Album for the rest of the listing. The second set of albums does not duplicate the first: my whole